validate_form.js -- Example: Heavy Duty
Example: Heavy Duty
This example pulls out all the stops. It also allows you to dynamically set the debugging amount, which is passed in as the third parameter to getUserErrorMsgs
.
return isFormValid(this);">
(* = Required)
resetValues(this.form);">
goodValuesRqd(this.form);">
goodValuesRqd(this.form);
goodValuesOther(this.form);">
badValues(this.form);">
* First Name:
* Last Name:
* Address line one:
Address line two:
* City:
* State:
* Zip code:
* Phone:
Fax:
* E-mail address:
* What time do you usually go to bed?
Eight at night
Ten at night
Four in the morning
If you had to choose exactly three Baseball teams, which would you choose?
Philadelphia Phillies
Philadelphia Phillies
Philadelphia Phillies
Philadelphia Phillies
Philadelphia Phillies
Philadelphia Phillies
Philadelphia Phillies
What is your first favorite integer, between 8 and 88?:
What is your second favorite integer, greater than 88?:
What is your first favorite decimal, between 8.008 and 88.008?:
What is your second favorite decimal, greater than 88.008?:
Favorite foods (pick at least two, as many as four):
What type of information do you want? Choose at least one of the following:
I would like to be contacted as new information becomes available. yes no
Specific information/items:
Algorithm
Instructions
Folder
Please contact me by phone, every night, just as I'm serving the main course to my family. yes no
What is your question (required)?
Ask "another" question (not rqd, but max len of 100 chars):
Password:
Confirm your password: