Stopping double clicking with Perl CGI

Adam Bernard ab11+londonpm at
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.


More information about the mailing list