Possible Duplicate:
Detecting idle time in JavaScript elegantly
In a web application that I'm developing, on every page of the application, when nothing happens for a set amount of time, the page should automatically change. I think setting window.location
will do for the latter part.
However, when it comes to detecting that nothing has happened, I'm a bit stuck. I'd think that binding all keyboard and mouse events to a single handler could do it, but I'm wondering if there is a better way. Has anyone done this before?