...

View Full Version : 15 minute inactivity, redirects. How to capture ANY action on page?



BrightNail
05-01-2008, 11:36 PM
Hello,

what would be the code to have a "timer" on a page for 15 minutes. If the user clicks something, does anything - the timer resets.. otherwise, if they are in ative for 15 minutes, the page redirects.

how?

BWiz
05-02-2008, 04:35 AM
Using setTimeout(); may work.

BrightNail
05-02-2008, 04:42 AM
well, that would be "how to start the timer".. but the thing is, if they press a button or interact with the page at all, it resets.

I can't just setTimeOut because the user can be on a page for a hour if they want, its just that if they are there for 15 minutes without doing anything - no clicks, no nothing.. THEN we redirect.

Philip M
05-02-2008, 08:56 AM
well, that would be "how to start the timer".. but the thing is, if they press a button or interact with the page at all, it resets.

I can't just setTimeOut because the user can be on a page for a hour if they want, its just that if they are there for 15 minutes without doing anything - no clicks, no nothing.. THEN we redirect.

I thought that was what you wanted. :confused::confused:

Use setTimeout() - reset the timer onkeyup, onmousemove
but
Note: Each time a user moves the mouse one pixel, a mousemove event occurs. It takes system resources to process all mousemove events.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum