Results 1 to 2 of 2
Thread: screen saver type layer?
Jun 13, 2007, 07:33 #1
screen saver type layer?
I have an unusual request. My client wants a screen saver, but not a real "windows" screen saver. He just wants a scrolling message like the (windows text marquee screensaver) whenever the user has not been active on a page for 20 minutes. Then when they are active on the site again he wants to be able to just remove the message and continue back to where they were. Is there some sort of count down to 20 minutes before a scrolling text layer would appear? Maybe similar to the popups on this site?
Jun 13, 2007, 07:46 #2
- Join Date
- Sep 2005
- 2 Post(s)
- 0 Thread(s)
You would need to use window.setTimeout() for this, and set the second argument to 1200000 (1.2 million milliseconds). The first argument would be a function that displays this "screensaver".
You would also have to add something to trigger the end of the timer, the onmousemove event and onkeypress events are probably best (you would most likely need to use them both). With each of these events, you do window.clearTimeout() and then do a new window.setTimeout() to start it all over again, so that the 20 minutes begin when the user stops moving their mouse or typing.
No offense to your client, but it seems like a rather stupid request.