[Javascript] Detecting a doubleclick

Matt Barton javascript at mattbarton.org
Fri May 28 10:55:20 CDT 2004


Hows this:

<a href="#" onclick="dothis(a,x,false)" ondblclick="dothis2(a,x)">a:x</a>
<a href="#" onclick="dothis(a,y,false)" ondblclick="dothis2(a,y)">a:y</a>
<a href="#" onclick="dothis(b,z,false)" ondblclick="dothis2(b,z)">b:z</a>

...

function dothis (arg1, arg2, bDoneDoubleClick) {
    // some stuff...
}

function dothis2 (arg1, arg2) {
    // some stuff ...
    dothis (arg1, arg2, true);
}


Matt
----- Original Message ----- 
From: Terry Riegel
To: JavaScript
Sent: Friday, May 28, 2004 4:00 PM
Subject: [Javascript] Detecting a doubleclick


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)?



Terry Riegel
-----------------
MAILKEY: 2524427349







_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript




More information about the Javascript mailing list