Javascript question

bungpeng

Well-known member
Joined
Sep 10, 2002
Messages
906
Location
Malaysia
Sorry to post javascript question here, because I dont know where should I post...

May I know how to change the listbox items sorting using Javascript?

For examples: My listbox got 2 items "A", "B", how to change it to "B", "A"?
 
Since nobody answer my question, I was solve it using stupid method:

I remove all the items in listbox and adding them again in listbox according the new sorting.

It can be done but request more process, if any expert got a better solution, please let me know...
 
Data coming from database.

Actually I insert data to listbox from database, and let user maintain the sorting order ( one "move Up" and "move Down" buttons )
 
Hmm, short of using an array and sorting it that way I dont know how to do it on the client. Sorry.

Hold on. Is this an ASP Listbox?
 
Back
Top