sudharsan s

sudharsan s

  • NA
  • 204
  • 87.2k

Confirm password validation in javascript?

May 15 2012 4:58 AM
hi ...


 below code is my pwd and confirm pwd required filed validation in javascript..

now i want to chk this pwd and confirm pwd should same using javascript code...

help me to give confirm password validation in javascript.


if (document.getElementById("<%=txtpwd.ClientID %>").value == "") {
  alert("(*)Enter the password");
  document.getElementById("<%=txtpwd.ClientID %>").focus();
  return false;
  }

  if (document.getElementById("<%=txtConfirmPwd.ClientID %>").value == "") {
  alert("(*)Enter the Confirm Password");
  document.getElementById("<%=txtConfirmPwd.ClientID %>").focus();
  return false;
  }

Advanx THx

Answers (4)