From: Mike Taylor Date: Wed, 3 Jul 2013 11:16:29 +0000 (+0100) Subject: Oops, fixed a non-MKWS-specific HTML name (as opposed to id). X-Git-Tag: 0.9.1~362 X-Git-Url: http://git.indexdata.com/?p=mkws-moved-to-github.git;a=commitdiff_plain;h=b7d375be45c955d71b3e19fcf800fb21adeb5ee4 Oops, fixed a non-MKWS-specific HTML name (as opposed to id). --- diff --git a/experiments/spclient/mkws.js b/experiments/spclient/mkws.js index 94ad399..3abf9da 100644 --- a/experiments/spclient/mkws.js +++ b/experiments/spclient/mkws.js @@ -244,8 +244,8 @@ function my_onbytarget(data) { // wait until the DOM is ready function domReady () { - document.search.onsubmit = onFormSubmitEventHandler; - document.search.mkwsQuery.value = ''; + document.mkwsSearchForm.onsubmit = onFormSubmitEventHandler; + document.mkwsSearchForm.mkwsQuery.value = ''; document.mkwsSelect.mkwsSort.onchange = onSelectDdChange; document.mkwsSelect.mkwsPerpage.onchange = onSelectDdChange; } @@ -278,7 +278,7 @@ function resetPage() function triggerSearch () { - my_paz.search(document.search.mkwsQuery.value, recPerPage, curSort, curFilter); + my_paz.search(document.mkwsSearchForm.mkwsQuery.value, recPerPage, curSort, curFilter); } function loadSelect () @@ -290,7 +290,7 @@ function loadSelect () // limit the query after clicking the facet function limitQuery (field, value) { - document.search.query.value += ' and ' + field + '="' + value + '"'; + document.mkwsSearchForm.query.value += ' and ' + field + '="' + value + '"'; onFormSubmitEventHandler(); } @@ -537,10 +537,10 @@ function mkws_html_all(config) { mkws_html_lang(mkws_config); // For some reason, doing this programmatically results in - // document.search.mkwsQuery being undefined, hence the raw HTML. + // document.mkwsSearchForm.mkwsQuery being undefined, hence the raw HTML. debug("HTML search form"); $("#mkwsSearch").html('\ -
\ + \ \ \
');