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.
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.
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.
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.
来源:https://stackoverflow.com/questions/1382553/dragging-objects-out-of-an-iframe