https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15855
Bug ID: 15855
Summary: Disabling multiple submission on search form
Change sponsored?: ---
Product: Koha
Version: 3.18
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5 - low
Component: OPAC
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
Created attachment 48203
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48203&action=edit
Extract from koha-opac-access_log
Some impatient users tends to click several times on the “Go” button of the
search form on OPAC.
Probably in a desperate hope that this will speed up the whole process.
However the result is quite opposite, as Zebra is then queried multiple times
which increases the server cpu load, until it reach 100% and cause Denial of
Service (boooh…)
We had the idea of disabling the “searchsubmit” button upon first click.
This is done by adding onclick=”this.disabled=true;this.form.submit();return
true;” after “id=searchsubmit” in masthead.inc.
It is also possible to solve this issue by adding the following section to
opacuser.js:
$(document).ready(function() {
$('#searchform').submit(function() {
$('#searchsubmit').prop('disabled',true).text('searching...');
});
});
Thanks to Frederic Demians and Olivier Crouzet for their help.
--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/