Possible Duplicate:
How To Alter This Code So That It Only Redirects If There Is No Mouse Movement
I want to refresh a web page if there is no activity by the user using Javascript. User activity as in Key Press or mouse click.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Here a basic example
This will refresh the page every 15 seconds without a keypress or a click event (but if you have same events defined elsewhere making a
stopPropagation()this won’t properly work because the event won’t be able to reach the element)