This topic is locked
[SOLVED]

 Dynamic dropdown list

2/24/2004 1:16:45 PM
ASPRunnerPro General questions
L
Loic author

If I have in the same form a list A and B.

Value selected in A should filter value proposed in B.

Can I modify the SQL query in ASP runner lookup wizard of list B.

Or do I have to change the code of the asp pages.
In either option, do you know what the code.
Thanks for your help.
Regards

Loïc

Sergey Kornilov admin 2/25/2004

Loïc,
I don't have ready to go code for this.
You need to read a a current item value of list A and change SQL query for list B on the fly. Also you need to resubmit a form after list A selection changed.
Probably you can preload all values for both lists and switch it on the fly. Take a look at this page for more details: http://www.bookryanair.com/skylights/cgi-b...nguage=EN&fr=ry

You can see how list of destinations changes dynamically when you change origin.

501012 2/26/2004

Hey,

Perfect...... How did you do it? how did you make the list of destinations change dynamically when you change origin?

Lew

Sergey Kornilov admin 2/26/2004

Hi,
this is not my site actually. This is implemented by adding a Javascript handler for onChange event. This event fired every time drop-down box selection changes. You can see how it's implemented in the source code of that page.