Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

controlling the options in pulldown menus

Status
Not open for further replies.

hmcheung

Programmer
Oct 13, 2000
66
HK
I've got two pulldown menus. I want to change the options of one menu at the time the user make selection on the other one. Is there anything like this in javascript?
Code:
<script language=javascript>
function change_menu(){
   document.form1.menu2.option[1].value=....;
   document.form1.menu2.option[1].text=.....;
   document.form1.menu2.option[2].value=.....;
   .......................
   ........................

}
</script>


<form name=form1>
<select name=&quot;menu1&quot; onchange=change_menu()>
.........
</select>
<select name=&quot;menu2&quot;>
.........
</select>
</form>
thanks!!!
[sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top