diff --git a/koha-tmpl/opac-tmpl/npl/en/includes/livesearch.js b/koha-tmpl/opac-tmpl/npl/en/includes/livesearch.js index 8d57fcfc1b..87229810f9 100644 --- a/koha-tmpl/opac-tmpl/npl/en/includes/livesearch.js +++ b/koha-tmpl/opac-tmpl/npl/en/includes/livesearch.js @@ -118,11 +118,11 @@ function liveSearchDoSearch() { if (typeof liveSearchParams == "undefined") { liveSearchParams = ""; } - if (liveSearchLast != document.forms.searchform.value.value) { + if (liveSearchLast != document.forms.searchform.cql_query.value) { if (liveSearchReq && liveSearchReq.readyState < 4) { liveSearchReq.abort(); } - if ( document.forms.searchform.value.value == "") { + if ( document.forms.searchform.cql_query.value == "") { liveSearchHide(); return false; } @@ -132,8 +132,8 @@ function liveSearchDoSearch() { liveSearchReq = new ActiveXObject("Microsoft.XMLHTTP"); } liveSearchReq.onreadystatechange= liveSearchProcessReqChange; - liveSearchReq.open("GET", liveSearchRoot + "/cgi-bin/koha/livesearch.pl?value=" + document.forms.searchform.value.value + liveSearchParams); - liveSearchLast = document.forms.searchform.value.value; + liveSearchReq.open("GET", liveSearchRoot + "/cgi-bin/koha/livesearch.pl?cql_query=" + document.forms.searchform.cql_query.value + liveSearchParams); + liveSearchLast = document.forms.searchform.cql_query.value; liveSearchReq.send(null); } }