aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes problem in applying onclick and ondblclick for a same element Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "problem in applying onclick and ondblclick for a same element" Watch "problem in applying onclick and ondblclick for a same element" New topic
Author

problem in applying onclick and ondblclick for a same element

yuvaraj KumarAmudhan
Ranch Hand

Joined: Aug 22, 2009
Posts: 110
Is there anyway to apply the onclick and ondblclick events for the same button?

Thanks
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Use, but the onclick event will always fire so you need to build logic into it to wait to see if the dblclick event fires. Use flags and setTimeout.

Eric
 
Consider Paul's rocket mass heater.
 
subject: problem in applying onclick and ondblclick for a same element