Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Oct 2002
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    sorting problem : drag & drop items in a combo box

    i have a combo box filled with employee names. the user can select a name and physically move that name to the top of the list. so i guess, i would have to use dhtml. but i don't know where to begin. in the meantime, i made 2 buttons, up and down, with respective functions. can anybody give me any idea how to go about this dilemma? i'm a bit familiar with layers, divs, spans but i don't have a clue on the ff :

    1) how to position a layer in the exact place where the user selected a name.
    2) manipulate the layer's text field. i will keep on replacing the employee name in the layer's text field.

    given this code :
    function manualSort(personList){
    var personName = personList.options[personList.selectedIndex].value;
    ///-----after this i don't know what to do next
    }
    <select name="personList" multiple onclick="manualSort(document.myForm.personList);">
    blah blah
    </select>


    pls help!

  • #2
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    well, it depends on how intricate you wanna that application to be... drag'n'drop codes are quite complex... Do you really need that? You may use instead some buttons to choose / place / move up / move down, which means a little bit simplier code (mainly basic DOM methods)
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #3
    New Coder
    Join Date
    Oct 2002
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Kor
    You may use instead some buttons to choose / place / move up / move down, which means a little bit simplier code (mainly basic DOM methods)
    i already made that move up and down buttons for temporary use. i was hoping to enhance it , make it very very user friendly

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    Nashua, NH
    Posts
    1,724
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Here is a drag and drop sorting code applied for a somewhat different application:
    http://webdeveloper.klproductions.co...tquizdemo.html
    Vladdy | KL
    "Working web site is not the one that looks the same on common graphical browsers running on desktop computers, but the one that adequately delivers information regardless of device accessing it"

  • #5
    New Coder
    Join Date
    Oct 2002
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts
    @ Vladdy : now that was COOL!

    thanks!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •