wood burning stoves 2.0*
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 Murach's Java Servlets and JSP this week in the Servlets 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
 
 
subject: problem in applying onclick and ondblclick for a same element
 
Similar Threads
Calling Java Script function in CSS Styles
Is onSelect supported by html:select
Using onclick and ondblclick with setTimeout
build a data entry sheet like spread-sheet
Prevent multiple submits (e.g. double clicks) in a4j:CommandLink