x0x
Aug 23rd 2008, 7:24 am
I need a piece of javascript that will hide OR show a text box IF a certain thing is selected from the dropdown.
DROPDOWN:
<select name="stuff" class="textField">
<option value="" selected="selected" class="textField">-select one-</option>
<option value="1" <? if($starts==1){echo"selected";}?>>one </option>
<option value="2" <? if($starts==2){echo"selected";}?>>two</option>
</select>
When option "2" is selected a text box needs to appear next to the dropdown
<input name="anotherthing" type="text" class="box" value="" />
Can it be done?
DROPDOWN:
<select name="stuff" class="textField">
<option value="" selected="selected" class="textField">-select one-</option>
<option value="1" <? if($starts==1){echo"selected";}?>>one </option>
<option value="2" <? if($starts==2){echo"selected";}?>>two</option>
</select>
When option "2" is selected a text box needs to appear next to the dropdown
<input name="anotherthing" type="text" class="box" value="" />
Can it be done?