Hi,
I've created the code below which automatically adds two fields together (drop-down boxes) , without the need for a submit or input button.

Now, I am trying to do the same again, but this time instead of having drop-down boxes, i need to have text input boxes. (eventually i will be adding monetary values together).

So far, i've not had any luck, but would really appreciate some help or advice.

-----------

<script type="text/javascript"><!--
function updatesum() {
document.form.sum.value =
(document.form.sum1.options[document.form.sum1.selectedIndex].text-0) +
(document.form.sum2.options[document.form.sum2.selectedIndex].text-0); }
//--></script>

<body>
<form name="form" >
Select a number:
<select name="sum1" onChange="updatesum()">
<option selected>0<option>1<option>2<option>3<option>4
<option>5<option>6<option>7<option>8<option>9
</select>
and another number:
<select name="sum2" onChange="updatesum()">
<option selected>0<option>1<option>2<option>3<option>4
<option>5<option>6<option>7<option>8<option>9
</select>
Their sum is:</th> <td><input name="sum" readonly style="border:none"
value="0">
</form>
</body>

----------------

Thanks!

Ian