[Javascript] Detecting a doubleclick

Matthew Palmer mpalmer at hezmatt.org
Fri May 28 10:07:39 CDT 2004

On Fri, May 28, 2004 at 11:00:15AM -0400, Terry Riegel wrote:
> I have a page that I am trying to detect the doubleclick event. Each 
> anchor looks like this 
> <a href="#" onclick="dothis(a,x)" ondblclick="dothis2(a,x)">a:x</a> 
> <a href="#" onclick="dothis(a,y)" ondblclick="dothis2(a,y)">a:y</a> 
> <a href="#" onclick="dothis(b,z)" ondblclick="dothis2(b,z)">b:z</a> 
> ...etc 
> The function dothis2(a,b) basically does a few things then calls 
> dothis(a,b). Is there a way to deteck if a double click took place in 
> dothis(a,b)? 

Put an optional third arg to dothis() which dothis2() sets in it's call to

- Matt

More information about the Javascript mailing list