[Koha] Jumpng checkbox selections in Advanced Search

Chris Cormack chrisc at catalyst.net.nz
Mon May 3 07:46:37 NZST 2010


* Stacy Pober (stacy.pober at manhattan.edu) wrote:
> The selected checkbox for "Limit to any of the following" in Advanced
> mode jump around when users navigate to the page by using the "back
> button".  Their initial checkbox selections always jump six boxes down
> in our catalog.
> 
> Example:
> <http://man.waldo.kohalibrary.com/cgi-bin/koha/opac-search.pl?expanded_options=1>
> 
> In Advanced check the limit box for Curriculum Collection
> Type in a keyword.
> Hit Search.
> 
> After viewing result page, hit back button or backspace.
> 
> Now, the checkbox for Curriculum Collection is blank, but the one for
> Floor 4 is checked.
>
Hi Stacy

What browser are you using? Interestingly this behaviour doesn't happen
in chromium (chrome) but does in firefox. 

There is this chunk of javascript set up. Which is suspect is the
culprit

//<![CDATA[
    
	
	
	$(document).ready(function(){ $("#moresearches
a[href*=opac-search]").remove(); $("#moresearches").prepend("<a
href=\"/cgi-bin/koha/opac-main.pl\">Basic Search</a> | <a
href=\"/cgi-bin/koha/opac-search.pl?expanded_options=1\">Advanced
Search</a> "); $("#subtypes").appendTo("#pubrange");
$("#itype-19").parent().html("&nbsp;");      $("#booleansearch
fieldset").eq(0).append("<input type=\"submit\" value=\"Search\"
title=\"Search\" name=\"do\" accesskey=\"s\" class=\"submit\" />");
$("#subtypes .subtype").eq(3).hide(); $("#pubrange span").html("For
example: 1999-2001 for items published from 1999 through 2001.  You
could also use \"-1987\" for everything published before 1988 or
\"2008-\" for everything published after 2007.");
$("#ccode-17").parent().html("&nbsp;");
$("#ccode-18").parent().html("&nbsp;");
$("#ccode-19").parent().html("&nbsp;");
$("#ccode-20").parent().html("&nbsp;");
$("#ccode-21").parent().html("&nbsp;"); }); 


	//]]>

 
So if you go to system preferences, then to the opac tab. The edit the
opacuserjs ... take the js out, save it in a file somewhere so you can
put it back. Then save, then try it.

I did turn javascript off in firefox and it did fix it so I think this
js is not doing quite what its designed to do. At least not in firefox.

Hope this is some help. If removing the js fixes it you will probably
need to get your support company to do you some fixed version. Or
someone smarter at js than me anyway (Ive been doing web development since
1996, but have resisted learning js and more than rudimentary html ..
people can't ask you do it if you don't know :-))

Chris

-- 
Chris Cormack
Catalyst IT Ltd.
+64 4 803 2238
PO Box 11-053, Manners St, Wellington 6142, New Zealand


More information about the Koha mailing list