Hi,
You may want to change "class" to some other name:
case "fname":
validatedOK= checkFirstName(first_name_field); //pass a
reference to first name field to function
break;
.....//other case statements
case "class":
validatedOK= checkAccountStatus(frm);
break;
In JavaScript 2.0, "class" is a reserved keyword and using it in any
other context than making a JavaScript class can produce some
unexpected behavior. Just a heads up, it may or may not work
depending on the platform, and different JavaScript engines have
their own unique perspective.
Paul
.