Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
03-05-2012, 07:45 PM #1
- Join Date
- Mar 2012
- Thanked 0 Times in 0 Posts
I am new on java script and I want to check the form blank text fields by using onChange event.
Please guide me, is it possible or not....If possible then please send me the code.
MY EMAILID IS firstname.lastname@example.org
03-05-2012, 08:02 PM #2
- Join Date
- Jun 2002
- London, England
- Thanked 2,573 Times in 2,551 Posts
Form validation of the pattern if (document.forms.elements.value == "") (that is, checking simply for a blank field) is barely worthy of the name, and virtually useless, as even a single space, an X or a ? will return false, that is pass the validation. Numeric values, such as zip codes and phone numbers, should be validated as such. Ditto email addresses. This topic has been covered many times before in this forum.
For example, this is how you would validate an email address:-
Last edited by Philip M; 03-05-2012 at 08:09 PM.
All the code given in this post has been tested and is intended to address the question asked.
Unless stated otherwise it is not just a demonstration.