Disable submit button and display loader animation on form submit Disable submit button and display loader animation on form submit
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Disable submit button and display loader animation on form submit

Started by Αndré, October 09, 2014, 01:50:53 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Αndré

Extract of conversation below. Should be self-explanatory and applied to all submit buttons in Coppermine.

Quote from: ISANexusDev on September 26, 2014, 12:25:04 AM
in order to avoid several touchs on the OK button by nervous users or users with mobile devices with slow connections not sure if the touched correctly the button or not, would be:

<form method="post" name="post" id="post" onsubmit="if(notDefaultUsername(this, '{DEFAULT_USERNAME}', '{DEFAULT_USERNAME_MESSAGE}')){this.submit.disabled = true;this.submit.style.visibility='hidden';return true;}else{return false;}" action="db_input.php">

[..]

Disabling users to multiple submits of the same comment and at same time giving them an inmediate visual feedback that the button was touched (by hidding it)

Quote from: Αndré on October 07, 2014, 10:47:16 AM
Instead of hiding the button, I'd suggest to replace the button image with the loader animation (images/loader.gif).