[thelist] Simple Javascript field checking
john at johnallsopp.co.uk
john at johnallsopp.co.uk
Thu Feb 24 05:31:03 CST 2005
Hi
I'm using
function checkEmail()
{
if
(document.registrationForm.regEmail!=document.registrationForm.regEmail2)
{
alert ("Emails not the same");
return false;
}
return true;
}
wot I wrote myself to check onChange whether the second email is the
same as the first, in Firefox in Linux RH9.
The problem is, if it alerts an error and I correct it, when I move
on, it alerts again. If I go back to the field and change nothing,
then it's OK.
It's as if the function is being called before the new data is written
to the field.
What am I doing wrong?
J
More information about the thelist
mailing list