Jquery Autocomplete Unable to Empty Input on Internet Explorer
- by Matias
Hi,
I´ve got a Jquery autocomplete input like the following:
$("#cities").autocomplete(regionIDs, {
minChars: 2,
width: 310,
autoFill: true,
matchContains: "word",
formatItem: function(row) {
return row.city + ", " + "<span>" + row.country + "</span>";
},
formatMatch: function(row) {
return row.city;
},
formatResult: function(row) {
return row.city + ", " + row.country;
}
});
A listener for the input
$("#cities").result(function(event, data, formatted) {
selectedCity = (data.regionID);
});
And the input:
<input type="text" class="textbox" id="cities" name="q" autocomplete="off">
The trouble is when I reload the page, Internet explorer displays last user Input in the text box. However, the variable has no value.
I have tried with .reset() but no success.
Any ideas why ?