Revision: 37417
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at December 9, 2010 20:47 by hairajeshk
Initial Code
var idleTime = 5000; var timeOut = â€; function init() { Event.observe(document.body, ‘mousemove’, resetIdle, true); setIdle(); } function onIdleFunction(){ alert(‘Your browser has been idle for ‘ + (idleTime/1000) +’ seconds.’); } function resetIdle(){ window.clearTimeout( timeOut ); setIdle(); } function setIdle(){ timeOut = window.setTimeout( "onIdleFunction()", idleTime ); } Event.observe(window, ‘load’, init, false);
Initial URL
http://www.andrewsellick.com/67/simple-javascript-idle-state-using-prototype
Initial Description
find idle time in javascript
Initial Title
Idle timeout in Javascript
Initial Tags
Initial Language
JavaScript