Hey Gang, aside from mistakenly posting this in the Java Forum first it's my first time here so be gentle. I've been learning javascript through our local college and have run up against a problem. Maybe someone can help.
I'm using a simple validation script (external js) but continually get the same message "validation is not defined" and I can't get it to work for me.... Here's the code I'm using to access my form:
In addition to this, the reference I get when using FF javacript tool is that my first line in the html declaration <?xml version="1.0" encoding="UTF-8"?>
What am I missing...sigh. Lost in java hell...
DougB
I'm using a simple validation script (external js) but continually get the same message "validation is not defined" and I can't get it to work for me.... Here's the code I'm using to access my form:
Code:
function validation(document.forms.myForm) {
if (document.forms.myForm.e-mail.value.indexOf( "@" ) == -1)
{
alert( "Your e-mail address has been incorrectly entered. Please re-enter it" );
return false;
}
else
myForm.submit();
}
What am I missing...sigh. Lost in java hell...
DougB
Comment