From: berick Date: Thu, 24 Mar 2011 20:21:52 +0000 (-0400) Subject: read format value from selector on page load in addition to onchange, since the brows... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=176af56903c9a8f649e303616c75401c3da8a29a;p=evergreen%2Fequinox.git 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) --- 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:/, "");