File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Multiple onclick in a Button Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Mongo DB Applied Patterns this week in the MongoDB forum
or a resume review from Five Year Itch in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "Multiple onclick in a Button" Watch "Multiple onclick in a Button" New topic
Author

Multiple onclick in a Button

Alec Lee
Ranch Hand

Joined: Jan 28, 2004
Posts: 568
I am using IE6 and defined this function as the onclick handler of a button:

The problem is, if I comment out the .disabled= lines, and if I click multiple times quickly, there will be some clicks missed and not invoking my handler. Is disabling the button a proper solution to this problem? Is there a better way to avoid missed clicks if the user clicks a button several times rapidly?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56150
    
  13

Some of the rapid clicks may be being interpreted as double-clicks. If the user is going to do stupid things, sometimes there's not much you casn do for them.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
 
I agree. Here's the link: http://zeroturnaround.com/jrebel/download
 
subject: Multiple onclick in a Button
 
Similar Threads
Problem getting JavaScript code supplied by course to run
onclick="this.disabled=true;"
how to gray out a button after a browser is launched in javascript.
Selected radio button value to be send to action class
prevent multiple submission of forms in struts