This example demonstrates the checks for "did you select the wrong gender" and
"did you mix firstname with lastname". From experiance this happens way more
than you'd think.
Select a sex and type in a firstname that doesn't match.
Example: miss, peter.
Then jump to the lastname field, and see what happens. If your combination
was wrong, you'll get a js alert box.
Type in a lastname as firstname and vice versa.
Then move the focus away so that the onBlur() can fire, for example click a button.
If your combination was wrong, you'll get a js alert box.
The form was built using the
Bs_Form package. The client/server communication for
instant checking is made with
jsrs.
The user-code that implements this functionality (and the whole form) is: