mouse movements and idle time
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.
Does anyone have any ideas on this?
Any help would be greatly appreciated. Thanks.
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.
Thanks for the reply,
Yes, that's exactly what I want to do but I'm looking for help with the actual JS code.
I haven't done this myself, but here is a thread I found:
I'll take a look, thanks for helping out!
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)