View Full Version : DOM Drag - disappearing problem & making a copy

10-03-2006, 09:42 AM
1) Script Title: DOM Drag & Drop Script

2) Script URL (on DD):

3) Describe problem:
I have a couple of problems that I can't seem to overcome with this script. I am using a version of the script modified by the brilliant jscheure1 in this thread:
This allows me to drag an item outside of a div with overflow:auto on (I need this functionality).

My first problem seems to be caused by my Dreamweaver dropdown menus. The dropdowns need a container div, but whenever you drop an item within this div it disappears:
If you drop the item outside of the main website area it is ok. I found that if I remove the container div from the page then you can drop the item anywhere. I tried setting the the z-index of the drag items (400) to be higher than the Container (300), but that didn't help. I also tried making the height of the dropdown container smaller (100px) and closing the container div before the scrolling div of drag items, but that didn't help either.

Any thoughts on how I can stop the dropped item from disappearing and still keep my dropdown menus?

Secondly, I'm wondering if anyone has any suggestions about how I can leave a copy of the dragged item in the place that it was being dragged from. I'd liekt he user to be able to continue dragging multiple copies of the same item, over and over again. Each time they drag an item out, a new one is created and left in its place. I was thinking that I could clone the item in the startDrag function, but my Javascript skills aren't up to the job. I'm not sure how to do it. Any advice on this would be greatly appreciated as well.

Thank you!