Network_ninja Posted July 8, 2011 Share Posted July 8, 2011 Is there an event or a way in javascript to detect of find if the user has activity.. such as scrolling or moving the mouse around? Quote Link to comment https://forums.phpfreaks.com/topic/241387-javascript-event/ Share on other sites More sharing options...
Adam Posted July 8, 2011 Share Posted July 8, 2011 You mean to show a kind of away status after a period of time? Bind your handler to the "onmousemove" event of the BODY. Quote Link to comment https://forums.phpfreaks.com/topic/241387-javascript-event/#findComment-1239977 Share on other sites More sharing options...
Network_ninja Posted July 8, 2011 Author Share Posted July 8, 2011 What i wanted to achieved is I want to set an expiration for my site.. say 60 mins of inactivity the user will be logged out. but the count only starts when the user is idle.. so if he is scrolling(probably he's reading something) or he's moving his mouse around the count will not start... tnx Quote Link to comment https://forums.phpfreaks.com/topic/241387-javascript-event/#findComment-1239981 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.