-
Button Functions
I need to add the number values of 2 texts boxes and make it appear in the third text box
how would one do this?
l
Code:
<html>
<head>
<script language="javascript">
function buttonclick()
{
}
</script>
</head>
<body>
<h1><b><u>Rabbits vs. Foxes Population</u></b></h1><br>
<form name="forma">
<table border="1" width="50%" cellspacing="0" cellpadding="1">
<tr>
<td>Number of Rabbits</td>
<td><input name="numberofrabbits" type="text" size="6"></td>
</tr>
<tr>
<td>Death Rate</td>
<td><input name="deathrate" type="text" size="6"></td>
</tr>
<tr>
<td>Birth Rate</td>
<td><input name="birthrate" type="text" size="6"></td>
</tr>
<tr>
<td>No. of Foxes</td>
<td><input name="foxes" type="text" size="6"></td>
</tr>
<tr>
<td>Rabbit Conditions</td>
<td><Input type = radio Name = r1 Value = "N">Normal
<Input type = radio Name = r2 Value = "F">Fires
<Input type = radio Name = r3 Value = "E">Excellent</td><br>
</tr>
<tr>
<td>Graph the Rabbits</td>
<td> <input type="checkbox" name="graphrabbits" value="checked"></td>
</tr>
<tr>
<td><input type="button" onclick="buttonclick()" value="One Year Passes" size="30"></td>
<td>Years<input name="years" type="text" size="6"></td>
</tr>
</table>
</form>
</body>
</html>
-
First thing I'd do would be to ask this question in a javascript forum. Unfortunately this is a Java forum, a totally different beast.
Best of luck.