[thelist] updating cascading 'select' form elements from a database

Diane Soini dianesoini at earthlink.net
Wed Aug 11 20:17:52 CDT 2004


On Wednesday, August 11, 2004, at 04:53 PM, 
thelist-request at lists.evolt.org wrote:
>
> For example, select1 can have 10 choices. The values in select2 should
> be selected from the db table based on the current value of select1, 
> and
> update as it is changed. The values in select3 should be selected from
> the db table based on the current value of select2, and should update 
> as
> it is changed.
>
> I have vague thoughts about gathering all the data for all possible
> variations (probably 15 choices available for any of the selects, since
> most choices in select1 will have zero or one choice in select2; same
> for select2 -> select3) to create arrays and doing some gnarly
> JavaScript with those arrays to populate the selects on the fly.
>
> Is there an easier way?
>
What about using javascript and XML. Let's you make a trip to the 
server (for the XML file) without refreshing the HTML on the client 
side. Works in many modern browsers but not all, though.



More information about the thelist mailing list