Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

differentiating onclick and ondblclick

Status
Not open for further replies.

rachelason

Programmer
Jun 28, 2004
114
GB
HI ! Can someone tell me is it possible to have onclick and ondblclick on a single image? Is it possible to differentiate the click. The problem i am having is i have two different java script for onclick and ondblclick... but obviously onclick javascript is fired even if i doubleclick?
any help?
rach
 

If you need to differentiate between clicks and double clicks, but still handle both, then you will probably need to write a solution that counts the clicks, with a timer-based routine to handle double-clicks.

One advantage of a routine such as this is that it would be easily extensible to support triple clicks, etc.

Hope this helps,
Dan


The answers you get are only as good as the information you give!

 
Thanks Dan,,, now i know that there is no way javescript does it directly.. i can write a function.
thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top