GetReady Posted July 3, 2010 Share Posted July 3, 2010 Hey i basically use the following on a html website skin i have with an auto refresh function, is it possible to make the auto refresh stop once a link is clicked; code below 1. <html> 2. <head> 3. <script> 4. var asdf = false; 5. function StartTime(){ 6. if(asdf)clearTimeout(asdf) 7. asdf = setTimeout("RefreshPage()",5000); 8. } 9. function RefreshPage(){ 10. clearTimeout(asdf) 11. if(document.Test.CB1.checked) 12. document.location.href= "timerRefresh.htm?Checked" 13. } 14. function LoadPage(){ 15. var findCheck = document.location.href.split("?Chec"); 16. if(findCheck.length == 2){ 17. document.Test.CB1.checked=true; 18. StartTime() 19. } 20. } 21. </script> 22. </head> 23. <body onload="LoadPage()"> 24. <form name="Test"> 25. <input type="checkbox" name="CB1" onclick="StartTime()"> 26. </form> 27. </body> 28. </html> Quote Link to comment Share on other sites More sharing options...
xenophobia Posted July 4, 2010 Share Posted July 4, 2010 What do you mean by "when a link is clicked"? Is it any links on that page? Please explain more on the conditions. Quote Link to comment Share on other sites More sharing options...
GetReady Posted July 4, 2010 Author Share Posted July 4, 2010 Hi, Basically when i want it to refresh an iframe i have... once a link is clicked within the iframe (Steal.cfm) it would stop refreshing. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.