PDA

View Full Version : ondblclick without onclick


wac
12-09-2002, 08:35 PM
I've got a table which needs something to occur onclick, and a different thing to occur ondblclick. How to I get the ondblclick to occur without the onclick script running?????
Is there something in event that I can look at to determine whether this is really a doubleclick and not a single click????

chrismiceli
12-09-2002, 11:31 PM
not that i know of, you could put a timeout like this though, i think. but the double click is ie proprietary i think, so that is not good.

<img src="" onClick="function1()" ondblclick="function2()">
t = true;
function function1() {
if (t) {
setTimeout("if (t) {
//code here
", 400);
}
function function2() {
t = false;
//code here
}

try it

wac
12-10-2002, 12:15 AM
thanx, this should work. ondblclick will work in NS6+