I would like to populate textboxes with a value from a link in 3 tables, and then add them all together:
Any help with a javascript to do this would be appreciated..
Thanks
Code:
<body>
<form action="myfile.php" method="get">
<table width="200" border="1">
<tr>
<td><a href="#" onclick="setprice1(); return false;">1.00</a></td>
<td><a href="#" onclick="setprice1(); return false;">2.00</a></td>
<td><a href="#" onclick="setprice1(); return false;">3.00</a></td>
</tr>
</table>
<input name="price1" type="text" size="6" />
<table width="200" border="1">
<tr>
<td><a href="#" onclick="setprice2(); return false;">1.00</a></td>
<td><a href="#" onclick="setprice2(); return false;">2.00</a></td>
<td><a href="#" onclick="setprice2(); return false;">3.00</a></td>
</tr>
</table>
<input name="price2" type="text" size="6" />
<table width="200" border="1">
<tr>
<td><a href="#" onclick="setprice3(); return false;">1.00</a></td>
<td><a href="#" onclick="setprice3(); return false;">2.00</a></td>
<td><a href="#" onclick="setprice3(); return false;">3.00</a></td>
</tr>
</table>
<input name="price3" type="text" size="6" /><br>
<input name="price_total" type="text" size="6" />
</form>
</body>
Any help with a javascript to do this would be appreciated..
Thanks