The following code will give the message ‘wireNum.value is null or not an object’ Why?
Thank You for any help.
<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<script language=”javascript”>
<!– Begin
document.bgColor=”#C6EFF7″ // set to light teal
function calculate()
{
var frm=document.getElementsByName(“form”);
document.write(‘<br>’);
document.write(‘COIL FORM CAPACITIES CALCULATOR’);
document.write(‘<br>’);
document.write(‘wireNum content: ‘+frm.wireNum.value);
} // end of function -calculate
// End –>
</script>
<body>
</FONT FACE=”Courier”>
</P><P>
<FORM METHOD=POST>
Wire Size (AWG number 1 thru 44)…..:
<INPUT TYPE = Text NAME = “wireNum” SIZE = 2 value =”18″> <P>
<Input Type = Button NAME = “Calculate” value=”Calculate” onclick=”calculate()” >
</FORM>
</body>
</HTML>