Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem in applying onclick and ondblclick for a same element

 
yuvaraj KumarAmudhan
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there anyway to apply the onclick and ondblclick events for the same button?

Thanks
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic