Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
|
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 18th, 2004, 01:53 AM
Authorized User
 
Join Date: Dec 2003
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to sasidhar79
Default select box/List box alphabetic sort

Hello,

I have a listbox based navigation "Add", "Add all", "Remove", "Remove all" I have fulfilled these tasks, but my client wants the Sort order of the list box to be based on alphabetic order , on Add or Remove.

Please help me in acheiving this alphabetic sorting.

regards
Sasidhar

thanks,
Sasidhar
__________________
thanks,
Sasidhar
 
Old October 18th, 2004, 08:44 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Hello,

When you say listbox, do you mean a <select> box?

-Snib <><
Try new FreshView 0.2!
There are only two stupid questions: the one you don't ask, and the one you ask more than once ;)
 
Old October 19th, 2004, 01:31 AM
Authorized User
 
Join Date: Dec 2003
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to sasidhar79
Default

Hello

yes, I meant a Select box, any way I have fixed the alphabetic ordering, I got the code from Javascript Defiitive guide by Matt Kruse

thank you

sasidhar

thanks,
Sasidhar
 
Old November 10th, 2004, 03:04 AM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to vinod_yadav1919 Send a message via Yahoo to vinod_yadav1919
Default

Hello Sasidhar
Yes you can sort the List box(selectbox) ,for that you will have to create object ,since in order to sort the Text of List box ,you must have to arrange their values in the proper order.
So it's best choice to create object and do the sorting .

You can use array.sort() method only to sort array elements,since List Box may have different value and text ,so you will have use Custom Object .

Hope You will get the answer.
Cheers :)

vinod





Similar Threads
Thread Thread Starter Forum Replies Last Post
Seek help for select Month in list box apple88 Classic ASP Databases 1 October 11th, 2007 01:11 PM
multi-column list box values moved to 2nd list box sbmvr Access VBA 1 May 14th, 2007 01:58 PM
multicolored List Box or Select Box sasidhar79 Javascript 1 February 15th, 2005 01:47 AM
Multi Select List Box Coding Errors... snoopy92211 VB Databases Basics 10 June 30th, 2004 08:33 AM
Populate List Box by Combo Box Selection mmcdonal Access 2 June 15th, 2004 12:08 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.