title: Display message when I finish typing certain characters in textbox
body: <p>I have a requirement where I need to display a message beside Password text box that Limit is only 15 characters. When user enters 15 characters, a blinking label should be displayed immediately which will alert user.</p>
  
  <p>I achieved it when user clicks outside textbox, but I need to display message as soon as user types 15th character</p>
  
  <p><strong>While typing in the text box itself if max limit reached the user should be prompted.</strong></p>
  
  <p>My Code:<br/></p>
  
  <pre><code>&lt;asp:TextBox runat="server" MaxLength="15" TextMode="Password" ID="Password"&gt;&lt;/asp:TextBox&gt;
  &lt;asp:Label runat="server" AssociatedControlID="Password" ID="lblMaxChar" /&gt;
  &lt;asp:CustomValidator ID="cvMaxLimit" runat="server" ControlToValidate="Password" ClientValidationFunction="ValidateTextLength" /&gt;&lt;br/&gt;
  
  function ValidateTextLength(source, args) {
      var length = $get('&lt;%=Password.ClientID %&gt;').value.length;
      if (length &gt;= 15) {
          var lbl = document.getElementById('&lt;%=lblMaxChar.ClientID %&gt;');
          $(lbl).text('Limit is 15 characters');
         blink(lbl);
      }
  }
  var stopBlinking = false;
  setTimeout(function () {
      stopBlinking = true;
  }, 8000);
  function blink(selector) {
      $(selector).fadeOut('slow', function () {
          $(this).fadeIn('slow', function () {
             if (!stopBlinking){
                  blink(this);
              }
             else {
              $(this).hide();
          }
          });
      });
  }
  </code></pre>