I'm basically trying to record idle time on a web page through mouse events. If the mouse stops moving a timer would start and then say at 10 minutes of no mouse movement or idle time a redirect or function would kick off. If the mouse moves again then the timer starts over, etc.
A spent some time with the onmousemove event which seems to be the ticket but have nothing to show for it and can't seem to connect the dots.
you could use the mousemove event. Every time the event is fired, reset the timer to 0. Otherwise, let the timer run and when it hits a certain time fire off that function.
Or you can constantly get the mouse position and if it has changed, reset the timer. If it hasn't for a while fire off that function.
Bookmarks