hi fellas,

I set timeout for some function but within that duration if something happens i want to quit timeout and execute the function. i dont mean i need clear interval. let say settimeout will call a function 1 minute later, but about 30 seconds after i noticed that something has happened, than i want to quit the delay of function that will be called by settimeout and i want it the function be executed soon. Is there anyway?

i noticed that something has happened,

How will u come to know that some thing has happened? through some event right...
on that event call a function there u cancel the previous timeout using
clearTimeout()

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.