monitor-register.js 551 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
$(window).load(function(){
  $(document).ready(function() {
    $("#password_2").keyup(validate);
  });
  function validate() {
    var password1 = $("#password").val();
    var password2 = $("#password_2").val();
      if(password1 == password2) {
          $("#register-button").removeAttr("disabled");
          $("#validate-status").attr("style", "display:none");
      }
      else {
          $("#register-button").attr("disabled", "disabled");
          $("#validate-status").attr("style", "").text("Passwords do not match");
      }   
  }
});