You are here: irt.org | FAQ | JavaScript | Link | Q1677 [ previous next ]
Try:
<html>
<head>
<script language="JavaScript"><!--
if (document.layers) {
window.captureEvents(Event.MOUSEDOWN);
}
window.onMouseDown = myFunction;
var tID = '';
function myFunction(e) {
clearTimeout(tID); // reset the timer
tID = setTimeout("window.location='index.html'",180000); // leave the page in 3 minutes
}
//--></script>
</head>
<body onLoad="tID = setTimeout('window.location=\'index.html\',180000)">
...
</body>
</html>