"yacobson" <ya******@earthlink.net> wrote in message
news:s3*****************@newsread2.news.atl.earthl ink.net...
Hello
Need help setting this up so that the value selected in the "Ship"-select
box, will appear in the "Price"-text box automatically. (before submitting
the form or clicking on the price box).
<td><select name="Ship">
<option value="" >Select</option>
<option value="500">A</option>
<option value="400">B</option>
<option value="300">C</option>
<option value="200">E</option>
<option value="600">D</option>
</select>
</td>
<td>$ <input type="text" name="Price" value="" size="4"></td>
Thanks
SY
Will this help? Watch for word-wrap.
<html>
<head>
<title>shiprice.htm</title>
<script type="text/javascript">
function ship(that) {
var form = document.forms[0];
var valu = form.Ship.options[form.Ship.selectedIndex].value;
form.Price.value = valu;
}
</script>
</head>
<body>
<form>
<table border="0">
<tr>
<td>
<select name="Ship" onchange="ship()">
<option value="">Select</option>
<option value="500">A</option>
<option value="400">B</option>
<option value="300">C</option>
<option value="200">E</option>
<option value="600">D</option>
</select>
</td>
<td>
$ <input type="text" name="Price" value="" size="4">
</td>
</tr>
</table>
</form>
</body>
</html>