Jump to content

Bit of a hand please?


GetReady

Recommended Posts

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>  

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.