Stopping double clicking with Perl CGI

Adam Bernard ab11+londonpm at sanger.ac.uk
Thu May 22 11:18:55 BST 2008


> 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)

<input id="a" type="submit" onclick="this.disabled =
true;setTimeout('document.getElementById(\'a\').disabled =
false;',2000);" />
seems to work.

Adam


More information about the london.pm mailing list