PET SHOPPING – krmivá a chovateľské potřeby – Úvod
‚);
var stockOnly = ‚0‘;
if (document.getElementById(‚searchStockOnlyId‘) != null && document.getElementById(‚searchStockOnlyId‘).checked == true)
stockOnly = ‚1‘;
searchReq.open(„GET“, ‚http://www.petshopping.sk/suggestsearch/chckprm/suggest/search/‘ + str + ‚/stock/‘ + stockOnly + ‚.xhtml‘, true);
searchReq.onreadystatechange = handleSearchSuggest;
searchReq.send(null);
}
clearTimeout(timeoutsearch);
}
function handleSearchSuggest() {
if (searchReq.readyState == 4) {
var ss = document.getElementById(‚search_suggest‘)
ss.innerHTML = “;
ss.innerHTML = searchReq.responseText;
if(ss.innerHTML.length)
ss.innerHTML = ‚
‚ + ss.innerHTML + ‚
‚;
}
}
$ (document).ready(function(){
$ (‚#searchstringid‘).attr(‚autocomplete‘,’off‘).keyup(function() {
if(timeoutsearch) {
clearTimeout(timeoutsearch);
timeoutsearch = null;
}
timeoutsearch = setTimeout(searchSuggest, 400);
});
});
/* ]]> */