We try to implement the autocomplete function for our project. And it's working fine on all the browsers except on IE8.
When we load the page with the autocomplete, the page is completely loaded and then a blank page is finally displayed.
We try it on Chrome Firefox and IE 11 and it's working fine.
We used the 1.10.2 version.
ACC.autocomplete = {
bindAll: function()
{
bindSearchAutocomplete("search_form", "#global-search", "#search", ACC.autocompleteUrl);
},
};
bindSearchAutocomplete = function(formname, globalId, id, url)
{
$(id).autocomplete({
source: function( request, response ) {
$.getJSON(
url,
{
term : $(id).val()
},
function(data) {
response(data);
}
);
},
minLength: 2,
open: function(event, ui) { $(".ui-menu").css("z-index", 10000); },
close: function(event, ui) { $(".ui-menu").css("z-index", -1); },
focus: function( event, ui ) {return false;},
select: function(event, ui) {
if(ui.item) {
$(id).val(ui.item.value.trim());
}
document.forms[formname].submit();
},
autoFocus: function(){return false;}
});
};
$(document).ready(function() {
ACC.autocomplete.bindAll();
});