title: Any listener for input type text
body: <p>Hi in my input type text I want to call URL if user enters suppose three characters how to do that
  how to add listener? I am developing search application Now I am sending hard coded value "oil" in below code . Here is my code:</p>
  
  <pre><code>&lt;body&gt;
  
  &lt;div data-role="page" id="mainPage"&gt;
  
      &lt;div data-role="header"&gt;
          &lt;h1&gt;jQM Autocomplete&lt;/h1&gt;
  
      &lt;/div&gt;
  
      &lt;div data-role="content"&gt;
  
  
          &lt;p&gt;
              &lt;input type="text" id="searchField" placeholder="Categories"&gt;
              &lt;ul id="suggestions" data-role="listview" data-inset="true"&gt;&lt;/ul&gt;
          &lt;/p&gt;
  
          &lt;p&gt;
              &lt;a href="https://github.com/commadelimited/autoComplete.js" data-role="button"&gt;Download the code&lt;/a&gt;
          &lt;/p&gt;
  
  
      &lt;/div&gt;
  
  &lt;/div&gt;
  
  &lt;script&gt;
  
      $("#mainPage").bind("pageshow", function(e) {
  
          var substr,out,pra;
  
              var finalStr = "system"+encodeURIComponent("|^")+"0"+encodeURIComponent("|^")+"oil";
               var encodedURL = encodeURI("http://myDomainSearch.asp?requestString=");
               var parameters =  decodeURIComponent(finalStr);
  
  
          $.ajax({
          type: "POST",
          contentType:"application/x-www-form-urlencoded; charset=UTF-8",
          url: encodedURL,
          data: parameters
        }).done(function( msg )
                {
                    response  = msg
                      alert(response);
                      if(response.charAt(0)=='0')
                      {   
                          console.log("***"+ response);                                                         
                          substr = response.split('$');   
  
                          alert("inside if"+substr);
  
                          for (var out = 0;out&lt;substr.length-1;out++)
                          {                       
                              pra = substr[out].split('|^');
                              console.log("&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;"+pra[0]);
                              console.log("&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;"+pra[1]);
                              console.log("&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;"+pra[2]);
                              console.log("&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;"+pra[3]);                  
  
  
                          }
                      }
                      else
                      {
                          alert("error")
                      }
  
                      $("#searchField").autocomplete({
                      target: $('#suggestions'),
                      source: pra,
                      link: 'target.html?term=',
                      minLength:1
                  });
               }              
          );
      });
  &lt;/script&gt;
  </code></pre>
  
  <p></p>
  
  <p>Now instead of hard coded value I want that if user enter three characters in input type text above then it hit URL and according to that response will be shown in list.</p>
  
  <p>Any help will be appreciated. Thanks in advance.</p>