.autocomplete("search","") isn't updated to reflect recent dataase changes while application is running.
I am using autocomplete on a text box. The initialization is a follows:
$(Initialize);
function Initialize() {
$("input#Employer").autocomplete(
{
source: "/Home/GetCompanyItems"
, minLength: 0
, select: SelectHandler
}
);
$("#Employer").click(function () {
$("#Employer").autocomplete("search", "");
}
Everything works as I expect. When the user clicks in the box, the list shows. There is additional code under a button click that sends updates to the database. In the service function, the update function is executed properly, and the database is indeed updated. However, if later the user clicks on <input id="Employer" type="text"/> and the list opens, the new entries are not reflected in the list. If the user types a part of a name in the Employer input box, the list drops and does show the recently added item, provided the partial text matches. However, the search never shows the new item until I leave the application and restart it. I have verified that the database is in deed updated when the button is pushed. This looks like a cacheing problem to me. Is there anyway to get the list that is shown by .autocomplete("search","") to refresh?
This refresh problem only seems to happen with IE 8(both 32 bit and 64 bit). It does not happen with Chrome or Foxfire. So the problem really focus on how to get the refresh to work on IE 8.