anagai wrote:
I would like to cancel a settimout from happening. I dont want it to
execute the expression at all. clearTimeout just cancels the delay but
executes the expression anyway. I want to cancel the delay and the
function call. Is there a easy way to do this?
What are you talking about? The first argument of window.setTimeout() is
evaluated (string value) or called (Function object reference) only on
timeout, and is not evaluated or called when the time is not up and you
call window.clearTimeout() with the proper timeout ID as argument.
Probably you call a function instead of providing a reference to it in
the first argument of window.setTimeout(); if so, just do not call it.
PointedEars