Forum Moderators: open

Message Too Old, No Replies

filter a dropdown based on another

         

jackvull

3:17 pm on Nov 27, 2007 (gmt 0)

10+ Year Member



I retrieve some data from a db as follows:
SY100
SY110
SY111
SY112
SY121
SY122
SY123
SY130
SY140
SY150
SY210
SY240
SY311
SY312

This is used in one of my drop downs. Before getting to this drop down a user would select another filter dtermining what is displayed above. Ideally, I don't want to requery the database so is there a way to refilter the list in javascript.
Dropdown 1 choices
SY100
SY200
SY300

each of the codes in the top table is related to this so:
SY100 SY100
SY100 SY110
SY100 SY111
SY100 SY112
SY100 SY121
SY100 SY122
SY100 SY123
SY100 SY130
SY100 SY140
SY100 SY150
SY200 SY210
SY200 SY240
SY300 SY311
SY300 SY312

It doesn't seem like I can store both of these values in the option boxes to then resort the subsequent drop down?

jackvull

11:08 am on Dec 3, 2007 (gmt 0)

10+ Year Member



bump

jackvull

11:17 am on Dec 3, 2007 (gmt 0)

10+ Year Member



If I select SY100 in the first drop down, then I only want to display codes in the second drop down that begin SY1?

etc.