Hi,
I am new to Javascript and would like some help using the Javascript OnBlur Validation. Hopefully the answer will help other Javascript beginners to use this feature in Dynamic Registration.
Following is a list of the relevant Dynamic Variables and their question type that I have programmed:
$(Employment) - Listbox $(Company) - text box $(Title) - text box $(JobLevel)- Listbox $(Function)- Listbox $(WWemployees)- Listbox $(EmailType) - Radio Options
$(Employment) is a Listbox question that is set as a "Required Field." It asks their employment status. The options are (1) works full time, (2) works part-time, (3) military, (4) student, (5) homemaker, (6) retired, and (7) other.
The rest of the fields listed are not set to Required. However, if someone says that they work full-time, part-time, or in the military (first three options on $(Employment), I want to make them required.
In plain English, I am looking for the Javascript for $(Company) that says:
If Employment is option 1, 2, or 3 and Company is blank, display an error message that says "You must provide your company name."
I also need to know the syntax to test if no options were selected in the listbox questions or the last Radio Option.
Hopefully this makes sense. I do not know how Dynamic Registration stores its data and what the default values are to know that nothing has been selected/entered. I hate to ask someone to simply provide the answers, but I am hoping that a Javascript pro could give me the code for all six OnBlur validations in just a couple of minutes.
Thanks in advance for your help! Chip |