Stopping double clicking with Perl CGI

Paul Makepeace paulm at
Thu May 22 10:36:15 BST 2008

Off the top of my head,

<button id="onetime" onclick="javascript:disable();">Click me!</button>

<script type="text/javascript">
function disable() {
  var button = document.getElementById('onetime');
  button.disabled = true;


On Thu, May 22, 2008 at 10:17 AM, Chris Jack <chris_jack at> wrote:
> I thought I'd be a disruptive element in the group and ask a Perl question.
> What is the best way of stopping a user double clicking a button in a web page created using Perl CGI? I have written "my first web app" and the logs suggest one user double clicked in well less than a second. I want a programmatic solution rather than browser configuration solution.
> It has been suggested to me I could use cookies or a file on the server side - but I am worried about timing issues. I could use semaphores server side or do a radical architecture change to some sort of queued system but this seems overkill. In fact all of this seems overkill for what must really be a common problem requiring a mundane solution.
> It seems to me that the logical way to do it would be to disable the button when it is pressed, but I haven't found an example of how to do that on the web yet.
> Hence I am coming to you lot for inspiration...
> Chris
> _________________________________________________________________
> All new Live Search at

More information about the mailing list