Advanced search  

News:

cpg1.5.46 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter recently discovered vulnerabilities. It is important that all users who run version cpg1.5.44 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

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

0 Members and 1 Guest are viewing this topic.

Αndré

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

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.064 seconds with 20 queries.