
February 1st, 2013, 09:39 AM
|
|
Registered User
|
|
Join Date: Jan 2013
Posts: 2
Time spent in forums: 35 m 42 sec
Reputation Power: 0
|
|
Use an onload event to start a timer, and then redirect the page after sometime. Well this is just a javascript. Hope this will help.
For the timer, use the window.setTimeout function.
For the redirect, set the value of window.location.
Code:
<head>
<script type="text/javascript">
<!--
function redirect(url) {
window.location = url;
}
function beginSessionTimer() {
// 30000ms = 30s
window.setTimeout(redirect, 30000,
"http://www.yoursite.com/login.asp?session=clear");
}
//-->
</script>
</head>
<body onload='beginSessionTimer();'>
</body>
|