koha-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Koha-devel] Disabling multiple submission on search form


From: SUZUKI Arthur
Subject: Re: [Koha-devel] Disabling multiple submission on search form
Date: Mon, 15 Feb 2016 13:10:53 +0000

ERRATUM:

You should add this.form.submit(); return true;" as stated in the Sed command.

If missing “this.form.submit(); return true;” the trick works only in Firefox and IE (screw you Google…).

Best regards,

 

Arthur SUZUKI

Service informatique des bibliothèques

bIBLIOTHÈQUES UNIVERSITAIRES

Université Jean Moulin Lyon 3

6 Cours Albert Thomas - B.P. 8242 – 69355 Lyon Cedex 08

ligne directe : +33 (0)4 78 78 79 16 | http://bu.univ-lyon3.fr

 

L'Université Jean Moulin est membre fondateur de l'Université de Lyon

 

 

 

De : SUZUKI Arthur
Envoyé : lundi 15 février 2016 10:55
À : 'address@hidden'; 'address@hidden'
Cc : BOUIS Sonia; CROUZET Olivier
Objet : Disabling multiple submission on search form

 

Hello,

We are facing the following problem on our installation of Koha.

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 after “id=searchsubmit” in masthead.inc.

Here is a SED command to make it easier.

 

sed -i -e 's/id="searchsubmit"/id="searchsubmit" this.form.submit(); return true;"/' src/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc

 

Did any of you already faced similar problems?

Any other ideas or implementation are welcome!

 

Arthur SUZUKI

Service informatique des bibliothèques

bIBLIOTHÈQUES UNIVERSITAIRES

Université Jean Moulin Lyon 3

6 Cours Albert Thomas - B.P. 8242 – 69355 Lyon Cedex 08

ligne directe : +33 (0)4 78 78 79 16 | http://bu.univ-lyon3.fr

 

L'Université Jean Moulin est membre fondateur de l'Université de Lyon

 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]