Click here to Skip to main content
15,894,251 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to stop refreshing page, below code is for Refreshing page

function timedRefresh(timeoutPeriod) {
setTimeout("location.reload(true);",timeoutPeriod);
}

Thanx in Advance
Posted
Comments
jgakenhe 1-Aug-15 10:41am    
Comment it out.

just stop using that function you just made !
this function will telling your page every 'timeoutPeriod' do refresh
 
Share this answer
 
Use - clearTimeout() Method[^].
JavaScript
var myVar;

function myFunction() {
    myVar = setTimeout(function(){ alert("Hello"); }, 3000);
}

function myStopFunction() {
    clearTimeout(myVar);
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900