Click to See Complete Forum and Search --> : Basic Validation


wingman55
12-03-2003, 09:17 PM
I downloaded the JS Basic Validation. I am using it in conjunction with Matts Script Formmail.cgi.

The validation script work fine, with one exception. You must use the word "required" in conjunction with the field name. When the form is submitted, the script is not parsing out the word "required", as is called for in the script:

if (!pass) {
shortFieldName=tempobj.name.substring(8,30).toUpperCase();
alert("Please make sure the "+shortFieldName+" field was properly completed.");
return false;
}


So when the form is received it has the field name printed as "requiredname, etc.

It is probably something simple, but for the life of me I can't find where the problem lies. Any help would be appreceited.

Wingman55

TheBearMay
12-04-2003, 07:00 AM
Just for the sake of argument what does the string return if you don't substring it? requiredrequiredname?