View Single Post
  #20 (permalink)  
Old 10-20-09, 11:43 PM
End User's Avatar
End User End User is offline
Level II Curmudgeon
 
Join Date: Dec 2004
Posts: 3,027
Thanks: 14
Thanked 35 Times in 33 Posts
Quote:
Originally Posted by job0107 View Post
What do you need the aElts array for?

wz_dragdrop takes care of all that for you.
I need it (or some other method) for determining the order of the elements, since I'm using it for a drag & drop category sorting tool. The list of boxes/elements is created dynamically from the database, and the user can drag and drop them into whatever order he or she wants. In order to be able to save the arrangement I have to be able to know what order the elements are in after they're all done.

I saw reference to the "dd.elements" array in the documentation, but that doesn't get reordered when the elements are repositioned. The original example reordered the aElts array by doing some calculation on the 'margTop' and 'dy' params, but those params are no longer present.

I can get the two elements that are being affected in a drag and drop, and I was attempting to maintain an ordered array by exchanging their positions in the array as they were moved, but all I've found so far is about 97 different ways that I can't make work.
__________________
I don't live on the edge, but sometimes I go there to visit.
-------------------------------------------------------------------------
Sanitize Your Data | Oracle Date & Substring Functions | Code Snippet Library | [url=http://www.codmb.com/Call Of Duty[/url]
Reply With Quote