I have a change password screen and when the 2 passwords match i need to enable the save button. It works with IE8 + IE7 but fails to enable the button in IE6
var LblError = document.getElementById('ctl00_cphValNet_LblError');
var Pwd1 = document.getElementById('ctl00_cphValNet_txtNewPassword')
var Pwd2 = document.getElementById('ctl00_cphValNet_txtNewPassword2')
var Change = document.getElementById('ctl00_cphValNet_BtnUpdatePassword')
// code to check if password matches
Change.disabled = false;
Any ideas why this is happening
Sp
Could the RegEx be causing the issue?
function IsalphaNumericValidate(alphanumericChar) {
if (alphanumericChar.length < 6 || alphanumericChar.search(/[^a-zA-Z0-9 ]/g) != -1) {
return false;
}
else {
var re = /(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{6,}/;
return re.test(alphanumericChar);
}
}
instead of
try
demo