Won't drop except in specified DIVs...

Moderators: Calcifer, slothy

Won't drop except in specified DIVs...

Postby ryanbuell » Tue Feb 27, 2007 10:28 pm

Apologies in advance. I'm not a javascript wizard, and I'm afraid this is a stupid question.

I've been using the drag and drop script to enable users to drag thumbnail images from a lightbox to a template to create page layouts in an online application. I've been successful making the script recognize which DIV it's over when the drop takes place, and trigger an AJAX script in the background to update the template.

My problem is that I need to figure out how to make the script abandon the drag and drop, and return the thumbnail image to its original location, if the image is not dropped over a specified DIV. Right now, if I try and drop outside of a specified DIV, the thumbnail sticks to my cursor, and I can't get rid of it without refeshing the page.

I'm sure there's a simple solution, but I've been unable to figure it out. Thanks in advance for your help!

Posts: 2
Joined: Sat Feb 10, 2007 8:27 pm

Return to Drag and drop scripts

Who is online

Users browsing this forum: No registered users and 5 guests