Development (dhtml) Re-orderable list

Discussion in 'Software' started by ch424, 19 Oct 2004.

  1. ch424

    ch424 Design Warrior

    Joined:
    26 May 2004
    Posts:
    3,112
    Likes Received:
    41
    I'm looking for a way in HTML or dhtml or whatever to make a list of stuff re-orderable by the user dragging and dropping it, like you can on the start menu in XP. I googled for ages, and only found microsoft's bloated solution at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndude/html/dude090699.asp

    It has to be able to store the new postion of the moved object in javascript somehow. Anyone have ideas please? It need only be IE, not natscape or moz

    Thanks for any help,

    ch424
     
  2. 731|\|37

    731|\|37 ESD Engineer in Training

    Joined:
    5 Sep 2004
    Posts:
    1,047
    Likes Received:
    0
    you mean re-arrangeable? lol?

    im not exactly sure how you can do this with JS, but im pretty sure a Java applet could take care of this.

    if your willing to kill the "drag and drop" you could do it with JS by making an array with your elements and create a few buttons like "Move up" or "move Down" and have them change the position of the element in the aray and reload the page.

    duno if that helps but its the first thing that comes to mind
     
  3. Hepath

    Hepath Minimodder

    Joined:
    20 Oct 2003
    Posts:
    730
    Likes Received:
    0
    Is this for a specific browser, other than IE?

    I can give some pointers for IE, but I don't know if Netscape, Firefox and others of that ilk give events for Drag and Drop.

    Stu
     
  4. ellism

    ellism What's a Dremel?

    Joined:
    10 Sep 2003
    Posts:
    348
    Likes Received:
    0
    You could do this server side, as usualy people will only want to order the table one or twice so shouldn't be too much of a load.
     
  5. ch424

    ch424 Design Warrior

    Joined:
    26 May 2004
    Posts:
    3,112
    Likes Received:
    41
    Thanks people: I guess I'll just use 731|\|37's "Move Up" and "Move Down" method -- I think I can do that. :)
    Unless you have other ideas hepath...

    Thanks again

    ch424
     
  6. 731|\|37

    731|\|37 ESD Engineer in Training

    Joined:
    5 Sep 2004
    Posts:
    1,047
    Likes Received:
    0
    glad i could help :D
     
  7. Hepath

    Hepath Minimodder

    Joined:
    20 Oct 2003
    Posts:
    730
    Likes Received:
    0
    I'll come up with some IE specific code if you're interested.. but only if you want IE specific.


    P.S That article on MSDN you quote isn't actually bloatware - it's a full blown exandable treeview. If you just look at the bottom for the drag'n'drop info - thats all you need.

    Stu
     
  8. ch424

    ch424 Design Warrior

    Joined:
    26 May 2004
    Posts:
    3,112
    Likes Received:
    41
    Thanks alot for the offer, but I think I'll just use the moveup/movedown method.

    :D I just meant that when I tried it, it was too big to update unnoticeably quickly, once the asp page generation time comes into play.

    thanks again,
    ch424
     

Share This Page