Stopping double clicking with Perl CGI
chris_jack at msn.com
Thu May 22 14:23:51 BST 2008
Thank for all the replies. My opinion of CGI has gone down as a result of the various discussions... As I understand it, and correct me if I'm wrong on any of this:
1) If I disable the push button then run another perl script to process my results -> if I then push the back button the push button is still disabled on the first screen as I cannot pick up that the back button has been pressed. Hitting refresh would fix this - but I think that sort of user intervention is very bad.
2) If I disable the push button, then run another perl script, I cannot put a timer on to re-enable it on the initial screen.
3) If I disable the push button for 1 second then re-enable it then run another perl script - not only have I wasted a second of each user's life, it's still not safe because they can click on the push button after that second has elapsed.
IMO, all of these are actually worse for my application than allowing double clicks.
So I'm thinking that I could do 1 - but have a push button on the next screen to go back to the first screen. Still not what I would describe as good.
Oh - and given that this seems like a pretty fundamental sort of issue, I am disappointed that my CGI Programming with Perl doesn't even mention it, let alone suggest a robust solution. I am suddenly a lot clearer on why my online Barclays bank account prohibits hitting back.
More information about the london.pm