AnthonyJ20
Programmer
I'm using the script below that's been working pretty well. It notifies a user that their session is about to timeout about 5 minutes before it does. It they want to continue they click Okay and the page is refreshed. If they click cancel the session will continue to time out. What I want to do is have it so that if they click cancel they will be redirected to whatever page I choose. How would I do this?
<SCRIPT language="javascript">
function WarnUserTimeout()
{
if (window.confirm('Your session will expire in 5 minutes. Do you want To continue working?'))
{
window.history.go(0)
}
}
</SCRIPT>
</HEAD>
<BODY OnLoad="window.setTimeout('WarnUserTimeout()',(<%=session.timeout%>-5)*60*1000)">
<SCRIPT language="javascript">
function WarnUserTimeout()
{
if (window.confirm('Your session will expire in 5 minutes. Do you want To continue working?'))
{
window.history.go(0)
}
}
</SCRIPT>
</HEAD>
<BODY OnLoad="window.setTimeout('WarnUserTimeout()',(<%=session.timeout%>-5)*60*1000)">