From 176af56903c9a8f649e303616c75401c3da8a29a Mon Sep 17 00:00:00 2001 From: berick Date: Thu, 24 Mar 2011 16:21:52 -0400 Subject: [PATCH] read format value from selector on page load in addition to onchange, since the browser may remember the form value and set it for you (and inexplicably not fire the onchange) --- Open-ILS/web/opac/skin/kcls/js/search_bar.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Open-ILS/web/opac/skin/kcls/js/search_bar.js b/Open-ILS/web/opac/skin/kcls/js/search_bar.js index 61f136ee42..af36f2d93d 100644 --- a/Open-ILS/web/opac/skin/kcls/js/search_bar.js +++ b/Open-ILS/web/opac/skin/kcls/js/search_bar.js @@ -27,6 +27,14 @@ function searchBarInit() { G.ui.searchbar.facets.value = val==''?'':"identifier|mattype["+val+"]"; }; + setTimeout( + function() { + var format = getSelectorVal(G.ui.searchbar.form_selector); + if(format != '') + G.ui.searchbar.facets.value = "identifier|mattype["+format+"]"; + },0 + ); + /* set up the selector objects, etc */ var txtVal = (getTerm() != null) ? getTerm() : ""; if(getStype()=="cn") txtVal = txtVal.replace(/identifier\|bibcn:/, ""); -- 2.11.0