Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I stop a setTimeout() function? 1

Status
Not open for further replies.

daph

Programmer
Joined
Jun 9, 2000
Messages
65
Location
CA
Hey everyone,

I was just wondering if there is a way to cancel or stop a setTimeout() function once it has started. Sometimes it works perfectly, but on certain occasions, the user would have to wait till the time out is over with before starting a new action....is there a function to do this?
I hope I'm clear on my question...if not, I'll explain in details on request..

Thanks :)

-daph
 
var timer=setTimeout('somefunc()',60000)
...
clearTimeout(timer) Victor
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top