Hello,
I am trying to validate a form wherein someone will enter their first
and last name, fill out the form, then electronically "sign" at the
bottom. I want to confirm that the first and last names match in the
First & Last & Signature form fields. Here is the code I wrote, but
it doesn't work because indexof is supposed to be a string. What do I
need to do to fix this?
if (document.repForm.Signature.value.indexOf(First) == -1 ||
document.repForm. Signature.value.indexOf(Last) == "-1") {
alert("Signature does not match first and last name.");
document.repForm.Signature.focus();
return false;}
Thanks,
Jeremy