title: Alternative for keyup function
body: <p>am working in a popup when we click login a popup opens with fields !!!  i want to check username and password with database before login button fired.. used ajax with keyup function for password field!</p>
  
  <p>but keyup is firing for every character typed in password field... but the requirement is after typing password field ajax should be called and result should be displayed... is there any alternative for keyup?</p>
  
  <p>now am getting as "wrong password for every character typed" and after entring correct password it will login,... but i want to show error as wrong password when user completely enters password (if password is wrong)</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $(document).ready(function() {
         $("#upwd").change(function()
         //$('#upwd').on('input', function() 
         //$('#upwd').keyup(_.debounce(doSomething , 500), function() {
         var upwd = $("#upwd").val();
         var uemail = $("#uemail").val();
         var msgbox = $("#status");
         //alert(uemail);
         //alert(upwd);
         //setTimeout(function() { 
         //if($('#upwd').val() == upwd){ 
         $.ajax({ 
             type: "POST",
             url: "checkl_login.php",
             data: "uemail="+ uemail,
             success: function(msg){
             $("#status").ajaxComplete(function(event, request){
             if(msg == 'OK') {
               msgbox.html(msg);
               //return false;
             } else {
               msgbox.html(msg); 
             }
         });
      }
     });
       return false;
     });
  
    });
  
  &lt;/script&gt;
  </code></pre>
  
  <p>error displayed in status id in span......</p>
  
  <p>checkl_login.php code is aalso perfect.....</p>