By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,187 Members | 1,629 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,187 IT Pros & Developers. It's quick & easy.

Dynamic value change in Drop Down Menu

P: 4
Hi All,

I have a form with two drop down controls. I want to change the values of Drop Down Menu 2 if i select some value in Drop Down Menu 1.

Like If i select country then all the states of this country should get populated in the second menu.

Will appreciate your help.
May 24 '07 #1
Share this Question
Share on Google+
1 Reply


P: 20
Hi,

For this u have to post the value of drop down list1 that is selected.

u can post the values by submitting the asp page.u can code onchange event of dropdown list1.

as:

<select name="namesel" onchange="document.formname.action=' ';document.formname.submit()">

by thsi ur asp page will get potsed on chage on the drop down list.

now u can write this statement:

val=request.form("namesel") // this stalement will give u the value of option selected by user.

at very first run the value of "val" will be blank" " , so no problem......
now u can check the value of val for drop down list2.
May 24 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.