You are going to have problems with Internet Explorer on this one.

There are security issues with creating an element under one context and
moving it to another one.

Prior to 1.1.3, the following code would fail in IE:

$('<div>Hello world</div>').appendTo(iframe.contentWindow.document.body);

This is due to the fact that the div would be created under the parent
document context, and IE wouldn't allow node manipulation to the iframe
document.  (Since fixed in latest version of jQuery).

One solution would be to capture the drop event, and instead of using DOM
manipulation, duplicate the div element by creating a copy under the parent
document, then appending it to the drop zone, then removing it from the
iframe.

Note that this problem doesn't occur in FF/Opera/Safari, just IE.

JK

-----Original Message-----
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of [EMAIL PROTECTED]
Sent: Friday, April 06, 2007 6:49 AM
To: jQuery (English)
Subject: [jQuery] dragging from an iframe?


Hi,

How would I go about dragging a DIV from an iframe on my page to the
main page itself?  If anyone has any examples of how this is done, I
am most grateful.

Thanks, - Dave


Reply via email to