<HTML>
<HEAD>
<TITLE>Untitled</TITLE>
<SCRIPT language="JavaScript">
function calculate(){
var f = document.form1;
var first = f.t1.value;
var second = f.t2.value;
var third = f.t3.value;
f.t4.value = parseFloat(first) + parseFloat(second) + parsFloat(third);
}
</SCRIPT>
</HEAD>
<BODY>
<FORM name="form1">
<TABLE align="center" cellspacing="2" cellpadding="2" border="0">
<TR>
</TABLE>
<TR>
<TD>Inputbox 1
<INPUT type="text" name="t1">
</TD>
<TD>Input box2
<INPUT type="text" name="t2">
</TD>
<TD>Input box3
<INPUT type="text" name="t3">
</TD>
<TD>Result=
<INPUT type="text" name="t4" onfocus="document.form1.t4.blur()" readOnly="true">
</TD>
<TD>
<INPUT type="button" value="Calculate" onclick="return calculate()">
</TD>
</TR>
</TABLE>
</FORM>
</BODY>
</HTML>//If say only two text boxes are filled out and the person dose not need to fill in the third one I get NaN as a result in text box Four
<HEAD>
<TITLE>Untitled</TITLE>
<SCRIPT language="JavaScript">
function calculate(){
var f = document.form1;
var first = f.t1.value;
var second = f.t2.value;
var third = f.t3.value;
f.t4.value = parseFloat(first) + parseFloat(second) + parsFloat(third);
}
</SCRIPT>
</HEAD>
<BODY>
<FORM name="form1">
<TABLE align="center" cellspacing="2" cellpadding="2" border="0">
<TR>
</TABLE>
<TR>
<TD>Inputbox 1
<INPUT type="text" name="t1">
</TD>
<TD>Input box2
<INPUT type="text" name="t2">
</TD>
<TD>Input box3
<INPUT type="text" name="t3">
</TD>
<TD>Result=
<INPUT type="text" name="t4" onfocus="document.form1.t4.blur()" readOnly="true">
</TD>
<TD>
<INPUT type="button" value="Calculate" onclick="return calculate()">
</TD>
</TR>
</TABLE>
</FORM>
</BODY>
</HTML>//If say only two text boxes are filled out and the person dose not need to fill in the third one I get NaN as a result in text box Four