doobster
09-24-2003, 01:46 PM
Hello I have a page that displays an advertisers website for a specified time limit.
Currently I use simple javascript to countdown to zero. When zero is reached the user is redirected.
What I was wondering if it is possible to ensure that the user is actually looking at the page.
What I mean by that is ensure the window is not minimized and the user has the mouse somewhere in the browser window.
I would like the script to check for this each time a second is taken away. So if the user is not viewing the page the counter will not move. If they are the counter will count down.
Any help on this would be greatly appreciated.
Currently I use simple javascript to countdown to zero. When zero is reached the user is redirected.
What I was wondering if it is possible to ensure that the user is actually looking at the page.
What I mean by that is ensure the window is not minimized and the user has the mouse somewhere in the browser window.
I would like the script to check for this each time a second is taken away. So if the user is not viewing the page the counter will not move. If they are the counter will count down.
Any help on this would be greatly appreciated.