PDA

View Full Version : Hide/Show Textbox Based on DropDown Menu Option



crampo
11 Oct 2009, 12:13 PM
Hi I have this html code



<select name="os1">
<option value="Love" selected>Love
<option value="Best Wishes">Best Wishes
<option value="Happy Xmas">Happy Xmas
<option value="Just To Say">Just To Say
<option value="Thank You">Thank You
<option value="Congratulations">Congratulations
<option value="Blank (No Quotes)">Blank (No Quotes)
<option value="Other">Other
</select>


I have 9 of these drop down boxes on a page (all different items) each dropdown is exactly the same and the name is the same (for paypal)

what i want to do is when the user clicks "Other" is show a text box (and any other selection hide it)

this is the code for the text box


<input type="hidden" name="on2" value="">oth
<input type="text" name="os2" id = "os2" maxlength="60">


The name "os2 has to stay the same (for paypal ...)

Can anyone help me with this.

Thank You
Crampo
D