How to stop this timer?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • BijaN
    New Member
    • Jun 2010
    • 1

    #1

    How to stop this timer?

    Hi,
    I want to stop the timeout of a site with this source (attached)
    Plaese help me.



    It may have two counter i want to stop the second one or all of them.

    thanx for your helps.
    Attached Files
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5390

    #2
    you might use the clearTimeout(re f) or clearInterval(r ef) methods to stop timed execution of javascript - have a look here for examples and the usage of the methods. basically you assign the timeout to a variable like this:

    Code:
    var func = function() {
        alert('foo');
    };
    
    var to = window.setTimeout(func, 1000);
    
    // this instantly will stop the timeout ->
    // so func is not executed
    window.clearTimeout(to);
    kind regards

    Comment

    Working...