onchange event for select
Moderator: General Moderators
onchange event for select
hi, i just wanted to know how to come up with this one..i have a <select> and if i select an option from that item, i want another <select> to appear right beside it. i don't know how to do this because im fairly new to javascript. thanks. 
- CoderGoblin
- DevNet Resident
- Posts: 1425
- Joined: Tue Mar 16, 2004 10:03 am
- Location: Aachen, Germany
If you have select options already in the second select not affected by the first simply build it and set it's style to display:none; or whatever. The onchange event of the first select should simply change this style setting.
If the response of the first select affects the content of the second select you need to "chain select". Many solutions out on the web and this forum.
Dynamic/Chained Selects using Ajax Prototype/JQuery may give you some ideas.
If the response of the first select affects the content of the second select you need to "chain select". Many solutions out on the web and this forum.
Dynamic/Chained Selects using Ajax Prototype/JQuery may give you some ideas.