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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating dropdown menu in javascript based on radio button selection

Status
Not open for further replies.

smithje77

Programmer
Joined
Jul 17, 2006
Messages
2
Location
US
Hi - I am writing a web page in which I want to use javascript to dynamically generate a drop down menue based on which radio button is selected. I've tried to set up a javascript function to generate this drop down using code
document.form.dowpdownname.options[0] = new Option('', '', '');
but this is not working.

I have a page with:
0 Select this option
0 Select this option 2

Drop down
(should changed based on above selection)

Any help?
 
Try checking the javascript faqs for help. This topic has been covered about 5000 times in this forum.


The section labeled "dynamic listboxes!" is what you're looking for.

-kaht

[small]How spicy would you like your chang sauce? Oh man... I have no idea what's goin' on right now...[/small]
[banghead]
 
Thanks - sorry I posted so quick - but I was not able to find any info on google - I figured I was searching with the wrong keywords - I was using dynamic dropdown and not getting what I wanted

Thanks
Joy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top