I have this script that redirects if users mouse or scrollbar is inactive for a time. Works on my mac, but on IE6 on a pc with xp, I get errors- 'time1' is undefined
do I need to do something special for IE?
any ideas?
thanks!
<script type="text/javascript">
<!--
function timer() {
time1=window.setTimeout("redirect()",1000000);
}
function redirect() {
window.location = "logout.php"
}
function detime() {
window.clearTimeout(time1);
timer();
}
// -->
</script>
<body bgcolor="#ffffff" onload="timer();
MM_preloadImages('images/Chipcreelink_roll.gif','images
/crowlink_roll.gif','images/ncheylink_roll.gif','images
/WIwhclink_roll.gif','images/purchaselink_roll.gif','images
/dvdscdslink_roll.gif','images/contactslink_roll.gif','images
/WIaithplink_roll.gif','images/thanks_roll.gif')" onmousemove="detime()"
onscroll="detime()">
do I need to do something special for IE?
any ideas?
thanks!
<script type="text/javascript">
<!--
function timer() {
time1=window.setTimeout("redirect()",1000000);
}
function redirect() {
window.location = "logout.php"
}
function detime() {
window.clearTimeout(time1);
timer();
}
// -->
</script>
<body bgcolor="#ffffff" onload="timer();
MM_preloadImages('images/Chipcreelink_roll.gif','images
/crowlink_roll.gif','images/ncheylink_roll.gif','images
/WIwhclink_roll.gif','images/purchaselink_roll.gif','images
/dvdscdslink_roll.gif','images/contactslink_roll.gif','images
/WIaithplink_roll.gif','images/thanks_roll.gif')" onmousemove="detime()"
onscroll="detime()">