this must be a better way with regular expressions, any suggestions?
if (objFrm.frmPassword.value == ""){
objFrm.frmPassword.focus();
alert("Please enter a password.");
return false;
}
if (objFrm.frmPasswordConfirm.value == ""){
objFrm.frmPasswordConfirm.focus();
alert("Please confirm your password.");
return false;
}else if(!objFrm.frmPassword.value==objFrm.frmPasswordConfirm.value)
alert("passwords do not match")
}
if (objFrm.frmPassword.value == ""){
objFrm.frmPassword.focus();
alert("Please enter a password.");
return false;
}
if (objFrm.frmPasswordConfirm.value == ""){
objFrm.frmPasswordConfirm.focus();
alert("Please confirm your password.");
return false;
}else if(!objFrm.frmPassword.value==objFrm.frmPasswordConfirm.value)
alert("passwords do not match")
}