title: Jquery autocomplete post request only once
body: <p>I am using jquery autocomplete. I am not happy with the code below because there must be a better way to do this. (code works)</p>
  
  <ol>
  <li>I want the user to enter 3 letters into the search box</li>
  <li>autocomplete post parameters and server responds</li>
  <li><strong>After we have the data coming from server there is no reason to post again.</strong>
  note: autocomplete will keep on postind data every time user adds a new letter</li>
  <li>since I have the data, I want to use this data as source of autocomplete</li>
  </ol>
  
  <p>The code below works with a little problem. on select one it is display in the box. When I use <strong>backspace it doesnt refresh/populate the suggestions</strong>.</p>
  
  <p><strong>Question</strong>:
  How can I use autocomplete to post only once and reuse the response adn the source for the autocomplete?</p>
  
  <p>If can anyone suggest or point any document I could read.</p>
  
  <p>Thanks</p>
  
  <pre>
  
  jquery-1.9.1.min.js
  jquery-ui-1.10.0/jquery-ui.js
  
       $("#birds").autocomplete
      ({
      source: function(request, response) {
      $.ajax(
      {
      url: "page.aspx",
      data: {
      Para: request.term,
      GroupID: 11,
      rGUI: 'd9',
      rURL: 'domain.com/',
      task: 'get Stuff'
      },
      type: "POST",  
      dataType: "json",  
      success: function(data) {
  
      //response: function(item) {
      var arr = $.map(data, function(item) {
      return {
      label: item.LN60,
      value: item.LN60,
      NDC: item.NDC
      }
      });
  
      $("#birds").autocomplete({
      source: arr,
      minLength: 1
      });
  
      $("#birds").autocomplete({
      close: function(event, ui) {
      suggestDrugs_Request();
      }
      });
  
      }
      });
      },
      minLength: 2,
      select: function(event, ui) {
      log(ui.item ? "Selected: " + ui.item.value + 
      " aka " + ui.item.NDC : "Nothing selected, input was "
       + this.value);
      }
      });
  
  </pre>