By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,188 Members | 832 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,188 IT Pros & Developers. It's quick & easy.

canceling settimout altogether

P: n/a
hi

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?

Andy Nagai

Jan 4 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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
Jan 4 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.