Basically, I have a popup window and I want ability to drag and drop an html item back to parent opener window. For example, if there is an image on the popup window which is draggable (and basically a handler only), once I drop it in the drop-zone of the parent window I just need to copy a hidden ID and/or maybe name of the Image from the popup to the parent window.
I can see plenty of examples on same page drag and drop but across windows? Is it possible? Both these windows have same website opened so I suppose there shouldn't be any cross-site issue thing?
Could you point me to the right direction? Anything not clear please ask.
EDIT
Is HTML5 an option?
Another EDIT
Is there another way to achieve above? i.e. different method than drag and drop - I am interested in transferring some data between one window to another here. Any ideas will be appreciated.
Basically, I have a popup window and I want ability to drag and drop an html item back to parent opener window. For example, if there is an image on the popup window which is draggable (and basically a handler only), once I drop it in the drop-zone of the parent window I just need to copy a hidden ID and/or maybe name of the Image from the popup to the parent window.
I can see plenty of examples on same page drag and drop but across windows? Is it possible? Both these windows have same website opened so I suppose there shouldn't be any cross-site issue thing?
Could you point me to the right direction? Anything not clear please ask.
EDIT
Is HTML5 an option?
Another EDIT
Is there another way to achieve above? i.e. different method than drag and drop - I am interested in transferring some data between one window to another here. Any ideas will be appreciated.
Share Improve this question edited May 28, 2012 at 8:26 user1421214 asked May 28, 2012 at 7:57 user1421214user1421214 9094 gold badges17 silver badges25 bronze badges 2- stackoverflow./questions/3694631/… – ixx Commented May 28, 2012 at 8:43
- I have already looked at that question and some others before posting mine – user1421214 Commented May 28, 2012 at 9:03
1 Answer
Reset to default 12You are after the HTML5 Drag and Drop API
A pretty good description: DnD Basics
You can even drag and drop stuff between Firefox and Chrome. Safari is missing the drop event, should be out in the next release (6 if I'm right). Opera & IE is not supporting it yet.