This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Multiple onclick in a Button Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
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: 569
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: 63208
    
  69

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
Have you checked out Aspose?
 
subject: Multiple onclick in a Button
 
It's not a secret anymore!