Dragging objects out of an IFrame

百般思念 提交于 2019-12-06 04:32:49

问题


I have an IFrame on my page pointing to a page containing list of <li /> elements. The <li /> elements are Draggables created using Scriptaculous library.

The question is how do I drag the elements OUT of the IFrame, and drop them on the page containing the IFrame?

Is there any library available which supports cross frame dragging & dropping? I don't know about jQuery, but Scriptaculous definitely doesn't support this.


回答1:


Check this interesting implementation, it was done using PrototypeJS and Scriptaculous

I find this workaround interesting since it actually uses two iframes that contain LI items, and you can drag and drop between the iframes.




回答2:


That is not possible as far as I know. The way iframes are implemented in browsers that would be like dragging and dropping page elements from one window to another.




回答3:


I believe it is possible in HTML5, but it's not widely implemented yet, and it's only a draft. You can google for some information on it, or play around with a demo I found. You should be able to rewrite it to work with iframes.

Demo

Specifications



来源:https://stackoverflow.com/questions/1382553/dragging-objects-out-of-an-iframe

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!