hii i am deepak dot.net developer at wepop
HI friends iam using two textboxes in my .aspx page
like one is new password second is confirm new password
if iam not giving same password in two textboxes it shows a message like password and confirm newpassword should not be same.
please enter same password.how to write javascript for this also before clicking the submit button
please help me
Sanjeeb LenkaPosted Sep 15, 2015, 2:35 AM
function myFunction() {
var pass1 = document.getElementById("pass1").value;
var pass2 = document.getElementById("pass2").value;
var ok = true;
if (pass1 != pass2) {
//alert("Passwords Do not match");
document.getElementById("pass1").style.borderColor = "#E34234";
document.getElementById("pass2").style.borderColor = "#E34234";
ok = false;
}
else {
alert("Passwords Match!!!");
}
return ok;
}
call it on client click