I was going to suggest something similar.  You could use a + and -
button to move the item up or down.  Then _javascript_ just needs to find
the currently selected item(s) and then add or subtract one to the index
and adjust the other indexes accordinly to move the others into the
right place.  I guess my other question would be, how are you going to
make these changes stick in the database or wherever you store these?

John

-----Original Message-----
From: Claude Schneegans [mailto:[EMAIL PROTECTED]
Sent: Friday, September 03, 2004 11:17 AM
To: CF-Talk
Subject: Re: DHTML Drag and Drop to reorder record set

>>Basically what I have is like a to do list. But lets say I want to
>>take item #5 and drop it between item #2 and #3 so it becomes
the new #3 and the old #3 becomes #4 and so on.....

I think in your case, I wouldn't use true drag'n drop, I mean drag
events.
Drag events are really to copy some content and paste it some where
else.
In your case, what you want to do is just identify an element in an
array and rearrange that array depending where you drop the element.
Just use mousedown event to identify the element being dragged, change
the cursor, and use a mouseup event to identify where the drop occurs,
But do not use drag events for this, it is much too complicated for what
you need.

--
_______________________________________
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to