最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

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

programmeradmin4浏览0评论

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
Add a ment  | 

1 Answer 1

Reset to default 12

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.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论