Javascript Form Field Validation
Posted: Wed Jun 02, 2010 2:08 pm
Hey all,
I want to be able to validate a text field in a form after the user fills it in as he/she moves to the next text. I would like the js file to be able to read the name of the text and tell wether the information for that text has been filled in correctly.
For instance I have two text fields named "F" and "B" respectively. The "F" field is first and the "B" field is second. What I would like is as the user finishes the first field and moves to the second field, the program will check what fields have been filled in, if they have been filled in, then it will check to see if the correct information is in it. In this case it would check to see that there are only 3 numbers in field "A".
Is there anyway to do this? I'm still new to javascript so I don't know.
Thanks!
I want to be able to validate a text field in a form after the user fills it in as he/she moves to the next text. I would like the js file to be able to read the name of the text and tell wether the information for that text has been filled in correctly.
For instance I have two text fields named "F" and "B" respectively. The "F" field is first and the "B" field is second. What I would like is as the user finishes the first field and moves to the second field, the program will check what fields have been filled in, if they have been filled in, then it will check to see if the correct information is in it. In this case it would check to see that there are only 3 numbers in field "A".
Is there anyway to do this? I'm still new to javascript so I don't know.
Thanks!