| Help with a validation function?
|
chornbeck

msg:3601648 | 10:23 pm on Mar 15, 2008 (gmt 0) | Keeps failing - any suggestions? function checkpass(field1,field2,alerttxt) { with (field1,field2) { if (Pass1.value != Pass2.value) {alert(alerttxt);return false} else {return true} } }function validate_form(thisform) { with (thisform) { if (checkpass(Pass1,Pass2,"Passwords do not match!")==false) {Pass1.focus();return false} } }
|
daveVk

msg:3601749 | 1:03 am on Mar 16, 2008 (gmt 0) | function checkpass(Pass1,Pass2,alerttxt) { if (Pass1.value != Pass2.value) {alert(alerttxt);return false} else {return true} } Perhaps ? In any case do away with the "with" statement
|
|
|