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

Joel D Canfield joel at spinhead.com
Wed Aug 11 14:42:03 CDT 2004


On an intranet form (MSSQL backend, VBScript) I need to create cascading
'select' form elements based on database input. I'd prefer to do it
realtime  if possible.

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?

joel


More information about the thelist mailing list