Forum Moderators: open
If the user selects option "1" a new text field gets displayed, if they select 2 or 3, nothing happens.
<select id="this" name="this" onchange="somefunction()">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
This gets display somewhere on the page when option 1 is selected.
<tr>
<td><input type="text"...></td>
</tr>
Thanks!
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Untitled</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form action="#">
<p>
<select id="selOne" onchange="targ=document.getElementById('inOne');this.value=='1'? targ.style.visibility='visible' : targ.style.visibility='hidden';">
<option>select an option</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
</p>
<p>
<input id="inOne" type="text" value="whatever" style="visibility:hidden;" />
</p>
</form>
</body>
</html>
Note: If desired, display:none;/display:inline; could be substituted for visibility:hidden;/visibility:visible;, with the obvious consequent connotations.