[thelist] Simple Javascript field checking

Matt Warden mwarden at gmail.com
Thu Feb 24 09:27:53 CST 2005


John,

On Thu, 24 Feb 2005 06:31:03 -0500 (EST), john at johnallsopp.co.uk
<john at johnallsopp.co.uk> wrote:
> 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.

If you are triggering the validation onChange, then it's not
necessarily "OK", its' just not getting validated again.

Can you inclue how you are calling it with the onchange? What are you
doing with the return true/false?

Thanks,


-- 
Matt Warden
Miami University
Oxford, OH, USA
http://mattwarden.com


This email proudly and graciously contributes to entropy.


More information about the thelist mailing list