Connecting Tech Pros Worldwide Help | Site Map

drag and drop image/text across frames

Newbie
 
Join Date: Jul 2008
Posts: 8
#1: Jul 15 '08
Hi ,
I am trying to create a webpage. It has 3 frames (left, middle and right). I want to be able to drag images from the left and the right frame into the middle frame. Each time i try to drag an image from one frame to another , the image just disappears. Can some one please tell me how this can be done?

Thanks,
Himani
rnd me's Avatar
Expert
 
Join Date: Jun 2007
Location: Urbana IL
Posts: 411
#2: Jul 15 '08

re: drag and drop image/text across frames


i would love to be wrong about this, but i don't think this can really be done.
not easily at least.

now, you could probably hand code something for just one browser, but there's no standardized way for javascript to handle this task.

most js drag and drop works by repositioning a container like a div on the screen.
that same div object cannot 'jump' into another frame or window.
it could possibly be replicated on both, and instantiated on a mouse move if button is down for the middle frame, but no easy way to "hand it off".
Newbie
 
Join Date: Jul 2008
Posts: 8
#3: Jul 16 '08

re: drag and drop image/text across frames


I guess that means i need to redesign my application and use divs instead of frames. Thanks for the response!!

Regards,
Himzi
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#4: Jul 16 '08

re: drag and drop image/text across frames


I much prefer divs to frames, but if you were to work with frames, you could try using importNode. Not sure how well it would work, but I'll put it out there for anyone interested.
Newbie
 
Join Date: Oct 2009
Posts: 1
#5: Oct 5 '09

re: drag and drop image/text across frames


I know this is an old thread, but it shows up near the top for searches on drag and drop across browser frames.
Since I have a solution, I hope you don't mind me reviving an old thread.

I had the same problem of trying to drag and drop page elements from one frame to another, but didn't find anything that did this in javascript.
So, I build a library named Frame Glider for this purpose.
The post with demos is at http://www.ankur.com/blog/30/javascr...cript-library/
Links to detailed documentation is included in that post.

Regards,
Ankur
Reply


Similar JavaScript / Ajax / DHTML bytes