title: How to bring ajax search onkeyup with jquery
body: <p><em>My Script to call ajax</em> </p>
  
  <pre><code>&lt;script language="javascript"&gt;
  function search_func(value)
  {
      $.ajax({
         type: "GET",
         url: "sample.php",
         data: {'search_keyword' : value},
         dataType: "text",
         success: function(msg){
                     //Receiving the result of search here
         }
      });
  }
  &lt;/script&gt;
  </code></pre>
  
  <p><em>HTML</em></p>
  
  <pre><code>   &lt;input type="text" name="sample_search" id="sample_search" onkeyup="search_func(this.value);"&gt;
  </code></pre>
  
  <p><strong><em>Question:</em></strong> while onkeyup I am using ajax to fetch the result. Once ajax result delay increases problem occurs for me.</p>
  
  <p><strong>For Example</strong>
  While typing <code>t</code> keyword I receive ajax result and while typing <code>te</code> I receive ajax result
  when ajax time delay between two keyup sometime makes a serious issue.</p>
  
  <p>When I type <code>te</code> fastly. ajax search for <code>t</code> keyword come late, when compare to <code>te</code>. I don't know how to handle this type of cases.</p>
  
  <p><strong>Result</strong> 
  While typing <code>te</code> keyword fastly due to ajax delays. result for <code>t</code> keyword comes.</p>
  
  <p>I believe I had explained up to reader knowledge.</p>