title: jQuery UI autocomplete refresh data
body: <p>I use jQuery ui autocomplete feature.</p>
  
  <pre><code>var colors;
  
  $(document).ready(function(){
          loadColors();
          $('#empf').autocomplete(colors);
  }
  
  function loadColors(){
   colors = new Array(getNumColor());
  //in a loop save the colors to array using colors[i] = ...
  }
  
  function addColor(){
      ...
      color[n] = color;
  }
  </code></pre>
  
  <p>When the user enters new color it is saved to the color array. I switch to the autocomplete form but the entered data is not aviable until I refresh the page.</p>
  
  <p>Any ideas how to make the new color avialable for autocomplete?</p>