Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- //this sets the timer with the current time setting if the user hasn't moved
- //their mouse in 5 seconds (1000 = 1second) then it will refresh to the main page
- window.onload = function () {
- //refreshy = setTimeout("window.location='main.php'", 1800000);
- refreshy = setTimeout("window.location='main.php'", 10000);
- }
- // every time the mouse is moved the timer resets giving the user more time
- // before the page refreshes
- window.onmousemove = function(timer, time) {
- clearTimeout(timer);
- timer = setTimeout("window.location='main.php'", time);
- }
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement