Stopping double clicking with Perl CGI

David Cantrell david at cantrell.org.uk
Thu May 22 13:08:30 BST 2008


On Thu, May 22, 2008 at 10:38:15AM +0100, Denny wrote:

> Google suggests:
> <input type="submit" ... onclick="this.disable = true" />
> 
> For bonus points, figure out how to re-enable the button after a few
> seconds, so that if the submit hangs and drops out they can try
> resubmitting it.  (I have no idea if that's possible, but it would be a
> neat solution to the main annoying problem with self-disabling submit
> buttons)

Presumably something along the lines of ...

  "this.disable=true;sleep(10);this.text='Try again';this.disable=false"

-- 
David Cantrell | A machine for turning tea into grumpiness

     Repent through spending


More information about the london.pm mailing list