The Google Closure (GC) Javascript Library makes it very easy to create an AutoComplete UI, as this demo shows - http://closure-library.googlecode.com/svn/trunk/closure/goog/demos/autocomplete-basic.html .
Basically, all we have to do is define an array and pass it on as one of the parameters. I'd like to be able to update the array dynamically and have AutoComplete show the changes immediately.
Example, if there are two arrays
list1 = ["One", "Two", "Three"]
list2 = ["1", "2", "3"]
and an AutoComplete has been initialized using list1,
var suggest = new goog.ui.AutoComplete.Basic(list1, document.getElementById('input'), false);
how can I update the existing AutoComplete (suggest) to use list2?