Hola,
este es el ejemplo:
<form name="javaRestaurant">
<table cellpadding="5" cellspacing="0" border="0">
<tr>
<td align="right"><strong>Select a Restaurant</strong></td>
<td>
<select name="restaurantSelect" onChange="go(this)">
<option value="-1">Choose a Restaurant</option>
<option value="47">Marks Pizzeria</option>
<option value="137">Tom & Nancys Pizza</option>
<option value="249">Clinton Park Cafe</option>
<option value="253">Dewittshire Tavern</option>
<option value="254">Pizios Pizza & Deli</option>
<option value="255">Sabatinos Pizza & Deli</option>
<option value="256">Nick's Place</option>
<option value="257">King Davids Middle Eastern Quisine</option>
<option value="258">Annettes Cafe</option>
<option value="259">East Wok</option>
<option value="262">Prontos Pizza</option>
<option value="263">Peppinos</option>
</select>
</td>
</tr>
<tr>
<td align="right"><strong>Restauran t Name</strong></td>
<td><input type="text" name="restaurantText" size="25"></td>
</tr>
</table>
<script language="javascript">
<!--
function go(thisValue)
{
var restaurantText = document.javaRestaurant.restaurantText
if (thisValue.value == "-1")
{
restaurantText.value = ""
}
else
restaurantText.value = thisValue.options[thisValue.selectedIndex].text
}
//-->
</script>
</form>
No se de dónde lo baje, por que hace tiempo que lo tengo.
Un saludo!!
[email protected]