Advanced search  

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

Pages: [1]   Go Down

Author Topic: Disable submit button and display loader animation on form submit  (Read 8658 times)

0 Members and 1 Guest are viewing this topic.

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764

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

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)

Instead of hiding the button, I'd suggest to replace the button image with the loader animation (images/loader.gif).
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 19 queries.