You are here: irt.org | FAQ | JavaScript | Timeout | Q1563 [ previous next ]
Try:
<html> <head> <script language="JavaScript"><!-- if (document.layers) { window.captureEvents(Event.MOUSEMOVE); } window.onMouseMove = resetTimer; var tID = ''; function resetTimer(e) { alert('here'); clearTimeout(tID); // reset the timer tID = setTimeout('executeTimer()',10000); } function executeTimer() { location.href = 'a.html'; } //--></script> </head> <body onLoad="tID = setTimeout('executeTimer()',10000)" onMouseMove="resetTimer()"> ... </body> </html>