Hello everybody,
I am pretty new at this so I keep getting an error that I can't figure out.
This is what I have:
function ValidateForm(field){
alert(field);
var dt=document.frmSample.field.value
if (isDate(dt)==false){
dt.focus()
return false
}
return true
}
</script>
<form name="frmSample" method="post" action="">
<p>Enter a Date <font color="#CC0000"><b>(mm/dd/yyyy)</b></font>
:
<input type="text" name="txtDate" maxlength="10" size="15" onblur="ValidateForm(this)">
</p>
<p>
<input type="submit" name="Submit" value="Submit">
</p>
</form>
When thge function is called, in the alert I get a result that said [object]
And I also get a "document.frmSample.field.value is null or not an object"
Why am I keep getting this error??? Help
I am pretty new at this so I keep getting an error that I can't figure out.
This is what I have:
function ValidateForm(field){
alert(field);
var dt=document.frmSample.field.value
if (isDate(dt)==false){
dt.focus()
return false
}
return true
}
</script>
<form name="frmSample" method="post" action="">
<p>Enter a Date <font color="#CC0000"><b>(mm/dd/yyyy)</b></font>
:
<input type="text" name="txtDate" maxlength="10" size="15" onblur="ValidateForm(this)">
</p>
<p>
<input type="submit" name="Submit" value="Submit">
</p>
</form>
When thge function is called, in the alert I get a result that said [object]
And I also get a "document.frmSample.field.value is null or not an object"
Why am I keep getting this error??? Help