Hi I have some simple validation on this page that is supposed to check for errors in filing in the form, however it keeps failing the validation on the email field even when i fill it in properly. any diea what might be going wrong? thanks
Your script is having trouble with either obtaining a correct reference to the email field, or with validating the email address itself.
yes i can see that, how can i know what is going wrong exactly?
Well, how are we supposed to know?
: )
Post some code??
hehe, just realised that I forgot to paste the link in the original post, and I’m thinking why can’t they see the code? ![]()
Here goes:
Lawlz : )
Sorry, where’s checkForm16()?
That’s further on down the page.
The first thing to check is the regular expression.
/[a-z0-9!#$%&'+\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/=?^_{|}~-]+(?:\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\.[a-z0-9!#$%&'*+\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/=?^_{|}~-]+)@(?:a-z0-9?\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\.)+a-z0-9?/i
Where did you get it from, and how do you know that it works as expected?
[ot]
/[a-z0-9!#$%&'+\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/=?^_
{|}~-]+(?:\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\.[a-z0-9!#$%&'*+\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/=?^_{|}~-]+)@(?:a-z0-9?\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\.)+a-z0-9?/i
Sounds like me in the morning after stepping in the cat barf again.[/ot]
ah ok that was the error, the code got changed while copying and pasting from one software to another, thanks for pointing it out, works now once i copied the correct code.