views:

462

answers:

5

Assume you have two web applications running in two different tabs/windows in your browser. Is there a predefined interface in IE, Firefox or Google Chrome to pass data between the two windows? If so it should be possible to implement drag'n drop, right? Because I don't think this is possible I wonder if the same could be achieved with Flash.

This sums up to the following question: Is it possible to implement cross-application drag'n drop behaviour with Javascript/DOM or Flash?

+4  A: 

No Javascript can not interact with another window. This is a restriction of the browser and Javascript's restriction to interact outside of its domain.

And as far as I know, this is not possible with Flash either.

Ólafur Waage
+8  A: 

I think you'll find an answer in the Chrome Experiment's Browser Ball.

In short, there is no good way to do this - but you'll see it's definitely possible.

Edit: I suppose I should make clear: you're very limited in what you can actually pass stuff between, and the browsers which are supported. What it seems like you're actually trying to accomplish may be impossible, but the general concept of passing between multiple windows is "possible".

Tony k
That's kinda cool :)
Ólafur Waage
Awesome! I can't wait to see stuff like that more often.
prinzdezibel
That's damned cool.
ceejayoz
A: 

No, not if they are unrelated (different domain), which is what your title suggests.

altCognito
Is it possible, if they share the same domain? If yes, how?
prinzdezibel
Well, I recommend you repost this question, but leave out the unrelated part. You have to have been responsible for opening the window, and then data access occurs through special properties on the window or document object (I can't remember which one) You might try to explain what you are trying to accomplish as well, and I'm sure you will get your answer quite quickly.
altCognito
(in other words, if you open the windows yourself via javascript)
altCognito
A: 

It could be done if you can relay drag/drop information to a server (Not a simple task).

CookieOfFortune
A: 

Use the clipboard. </kidding>

belgariontheking