[thelist] Multiple Selects in asp / javascript.

Peter Brunone (EasyListBox.com) peter at easylistbox.com
Tue Aug 24 09:13:02 CDT 2004


Hi Mark,

   There are pretty standard methods for doing this; the basic concept is that you'll want to add/remove options from the list based on the criteria, so you'll need to store the values and text in an array.  I have a list of articles (not complete yet) at http://easylistbox.com/listBoxResources.aspx that can show you various ways to do this; the server platform isn't really important, since all you do server-side is generate the empty list and the array.

   If you're using ASP.NET and you want a more packaged solution, you could try EasyListBox (relevant example at 
http://www.learnasp.com/freebook/learn/elb_searcherDependent.aspx ).

   Let us know what you decide to do and if you need more help.  Incidentally, there is an excellent Javascript list at 
http://www.mountaindragon.com/javascript/ as well.

Cheers,

Peter Brunone

Original Message:
>From: Ormerod Mark <mormerod at cornwall.gov.uk>
>To: "'thelist at lists.evolt.org'" <thelist at lists.evolt.org>
>Subject: [thelist] Multiple Selects in asp / javascript.
>Date: Tue, 24 Aug 2004 09:02:18 +0100

>Firstly - hi - I'm new on the list :)
>
>Ok my problem is this - I have a series of several hundred records which I
>need to display in a <select> list.
>Each row is essentially a unique ID (which would be the <option value="">) a
>concatenated field (which will be displayed as the select list item
><option>here</option> and a third value which is a ID linking the record to
>the geographical location of which there are 8.
>
>The particular spec requires a series of radio buttons above the select
>field to filter the select list - so that it only shows records whose
>geographical location ID matches the one checked by the radio box.
>
>Any thoughts on the most sensible way of doing this as I'm a "n00b" to
>javascript having used it mainly for form validation and window opening ?
>
>Cheers,
>
>Mark.




More information about the thelist mailing list