Show/Hide text and form field based on drop down selection

  • Follow


Hi

I'm trying to show/hide a simple piece of text and a text field on a
form based on what choice is made from a drop down box.

<select name="dropdown" size="1">
<option selected value="">Please make a selection</option>
<option value="1">Choice 1</option>
<option value="2">Choice 2</option>
<option value="3">Choice 3</option>
<option value="4">Other</option>
</select>

i.e. if Choice 2 is selected I'd like to display a new <tr> with the
following:

<tr> 
<td>New text field:</td> 
<td><input name="newField" type="text size="20"></td> 
</tr> 

if any other choices are made, I don't want to display anything.
I've tried several onchange() functions but can't achieve what I'm
looking for.

Any help would be appreciated,
Steve
2
Reply steve 6/27/2003 12:19:36 PM


0 Replies
609 Views

(page loaded in 0.013 seconds)

Similiar Articles:













7/21/2012 9:14:20 PM


Reply: