Here’s an example: http://jsfiddle.net/7g8GD/1/
Once you have entered an invalid input and hit enter it returns ‘Please enter your email address’ as it should however if you hit enter again without changing the input the validation is ignored and the form continues as if the input was valid.
What is the problem here?
(when I use this on my server the problem only occurs in IE9 and not in Chrome, but in jsFiddle it happens in both)
You have LOTS of inconsistencies and areas of concern with your code that are making your problem much more difficult to solve; Redundant selectors (
.class #id), lack of semantic elements (<input type="submit" />), unnecessary variables and conditional statements (if (...) { } else { if (...) {} }, etc.I’d suggest simplifying your issue down to the very basic requirement – validating the email and preventing the form from being submitted.
I’ve included your logic in a much simpler fashion with appropriate form controls and it works as you would expect.
http://jsfiddle.net/NkwnV/1/
It’s not a direct solution but hopefully it at least shows what you should be striving for and eventually helps solve your problem.