I am having trouble doing a simple part of a web page where all I need to do is read in two integers (given by the user), display them back onto the webpage (in the form of a label) along with an answer to a simple calculation such as adding them....some of the code that I have so far is posted below:
Code:
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<script type="text/javascript" language="javascript">
function mathall()
{
var firstnumber = parseInt(frmOne.Number1.value);
var secondnumber = parseInt(frmOne.Number2.value);
frmOne.Answer.value = (firstnumber + secondnumber);
}
</script>
</head>
<body>
<form method="post" name="frmOne">
<input id="Number1" type="text" /><br/>
+<br/>
<input id="Number2" type="text"/><br/>
<label id="Answer" name="Answer"></label><br/>
<input name="Equals" type="button" value="Answer" onclick="mathall()"/><br/>
</form>
</body>