This is slightly different. It will timeout the session after 7 minutes of
inactivity.
var closeTimer = null;
var timeout = 420; // 7 minutes in seconds.
function onloadFunctions()
{
startTimer();
body = document.getElementsByTagName("body");
body[0].onmouseover = startTimer;
}
function startTimer()
{
if (closeTimer != null)
clearTimeout(closeTimer);
closeCounter = timeout;
closeTimer = setTimeout("closeWindow()", 1000);
}
function closeWindow()
{
closeCounter = closeCounter - 1
window.status = closeCounter;
if (closeCounter <= 0)
window.location.replace("http://" + location.host +
"/logoff.cfm");
else
closeTimer = setTimeout("closeWindow()", 1000);
}
window.onload = onloadFunctions;
--------------
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA
"C code. C code run. Run code run. Please!"
- Cynthia Dunning
Confidentiality Notice: This message including any
attachments is for the sole use of the intended
recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the
intended recipient, please contact the sender and
delete any copies of this message.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:219247
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54