Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to drag and drop some content between two browser windows using JQuery or another method?

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.

like image 438
user1421214 Avatar asked May 28 '12 07:05

user1421214


1 Answers

You 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.

like image 107
zupa Avatar answered Sep 19 '22 17:09

zupa