What should be fairly simple script is giving the error "document.form has no properties". Any help would be greatly appreciated!
</code>
<script LANGUAGE="JavaScript1.1" SRC="FormChek.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
<!---
function checkJobid(){
var theForm=window.document.doedit;
var theVar=window.document.doedit.jobid.value;
if (isPositiveInteger(theForm.jobid.value))
{
if (theVar.length >= 3)
document.form['doedit'].submit;
else
{
alert("Please enter a Job ID of 3 or more digits"
;
theForm.jobid.focus();
return(false);
}
}
else
{
alert("Please enter a numeric Job ID "
;
theForm.jobid.focus();
return(false);
}
}
//-->
</script>
<form name="doedit" method="GET" action="makechange.asp">
<many more inputs>
<INPUT TYPE="button" name="submit" value="Submit Changes" onClick="checkJobid()">
</code>
</code>
<script LANGUAGE="JavaScript1.1" SRC="FormChek.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
<!---
function checkJobid(){
var theForm=window.document.doedit;
var theVar=window.document.doedit.jobid.value;
if (isPositiveInteger(theForm.jobid.value))
{
if (theVar.length >= 3)
document.form['doedit'].submit;
else
{
alert("Please enter a Job ID of 3 or more digits"
theForm.jobid.focus();
return(false);
}
}
else
{
alert("Please enter a numeric Job ID "
theForm.jobid.focus();
return(false);
}
}
//-->
</script>
<form name="doedit" method="GET" action="makechange.asp">
<many more inputs>
<INPUT TYPE="button" name="submit" value="Submit Changes" onClick="checkJobid()">
</code>