October 21st, 2002, 08:35 PM
Here is some very basic code to get you going.
<!--hide from old browsers
var c = Math.sqrt((a*a)+(b*b))
equation = window.open("open", "equation", "width=330,height=250");
<input type="text" name="a" value=""> enter side A.<br>
<input type="text" name="b" value=""> enter side B.<br>
<input type="button" value="submit"
You had some mistakes in your code.
First, name="a+a" is an invalid name, same with b+b
In your script you had document.add.a*a.value
a*a didn't even exist anyway (remember a+a)
You were missing a closing bracket from the hypotenuse() function.