furry_alarm_clock@hotmail.com said:[color=blue]
>
>Here is some javascript checking I have for form validation. The
>problem is is that it loops..... How can I make it stop ? IF I click
>on the last name text box, it scolds me, saying the first_name needs
>to be filled out. I click ok, and it says the last_name needs to be
>filled out...i click ok and it says the first_name needs to be
>filled.. wash rinse repeat !!!![/color]
Don't validate onBlur. Use onChange, if you must validate immediately.
You'll have to validate again onSubmit (and, of course, again on the server).
100 You click the "last name" box, giving it focus.
200 Since focus left the "first name" box, the popup message appears.
300 Then your code sets focus back to the "first name" box.
400 Since focus left the "last name" box, the popup message appears.
500 Then your code sets focus back to the "last name" box.
600 GOTO 200