Entry
Using return !count++ in a onClick event enables to disable a link, but how to know if it's clicked for the 1st,2nd,3rd times ?....
Jun 12th, 2002 07:42
David Blackledge, stéphane royer,
onclick="if(!count++) return true;else { alert(count+' clicks'); return
false; }"
So, the variable count will tell you how many times it's been clicked,
after the ++ line has been run.
(The if statement takes advantage of the postfix operator's feature of
returning the value of the variable BEFORE it's incremented. Remaining
code sees count with it's value AFTER it's incremented.)
David
http://David.Blackledge.com