Group, I have a quick question? -Is there a way to trigger this onclick event when the last keypress is up.
for example: verify that newPwd==reTypePwd on the last keyup in reTypePwd text box. If my password is foo I would like for the event to trigger on "o" and not "f".
function allClear() {
var newPasswd = document.getElementById('newPwd');
var reTypePasswd = document.getElementById('reTypePwd');
newPasswd.value = "";
reTypePasswd.value = "";
return true;
}
function validate()
{
var currPwd = document.getElementById("currPwd").value;
var newPwd = document.getElementById("newPwd").value;
var confirmNP = document.getElementById("reTypePwd").value;
if(currPwd == "" || newPwd == "")
{
document.getElementById("btnChange").disabled = true;
if(confirmNP!=newPwd){
document.getElementById("confirm").value = "Doesn't Match";
}
}
if(confirmNP!=newPwd)
{
document.getElementById("newPwd").style.cssText = "border-color:Red";
document.getElementById("reTypePwd").style.cssText = "border-color: Red";
}
else {
document.getElementById("btnChange").disabled = false;
document.getElementById("newPwd").style.cssText = "border-color:none";
document.getElementById("reTypePwd").style.cssText = "border-color: none";
}
}
Thanks
Chad