Beagle
03-17-2006, 04:35 PM
function mainOnSubmit()
{
return subOnSubmit1() && subOnSubmit2();
}
<form onsubmit="return mainOnSubmit();">
probably me, but that doesnt seem to work, i have the following functions, and onSubmit:-
<SCRIPT LANGUAGE="JavaScript">
function Length_TextField_Validator()
{
if ((changepasswordform.customers_password_1.value.length < 6) || (changepasswordform.customers_password_1.value.length > 10))
{
mesg = "You have entered " + changepasswordform.customers_password_1.value.length + " character(s)\n"
mesg = mesg + "Valid entries are between 6 and 10 characters.\n"
mesg = mesg + "Please verify your input and submit again."
alert(mesg);
changepasswordform.customers_password_1.focus();
return (false);
}
return (true);
}
function checkPw(changepasswordform)
{
customers_password_1 = changepasswordform.customers_password_1.value;
customers_password = changepasswordform.customers_password.value;
if (customers_password_1 != customers_password) {
alert ("\nYou did not enter the same new password twice. Please re-enter your password.")
return false;
}
else return true;
}
</script>
<FORM NAME="changepasswordform" ACTION="change_password_2.php" METHOD=GET onSubmit="return checkPw(this);">
sorry my mistake i got it to work, thanks for your help.