PDA

Click to See Complete Forum and Search --> : Message when Timeout


Sep 18th, 2000, 11:40 AM
In my ASP, i need to be able to set a session.timeout and when the timeout happens, I would like to display a message to the user and then exit the page.
Is it possible to do that.

Also I would like to provide a countdown clock to the user until the timeout expires.

Thanks for any clues.

Sep 18th, 2000, 04:20 PM
I put a countdown for the session using a timer instaed of using the session.timeout(in a client side script)

Could you let me know how to call a session.abandon or response.redirect from a client side script ?

monte96
Sep 18th, 2000, 07:20 PM
What are you trying to do by the way? You can easily check on the server side as the page is being displayed whether the session has expired and redirect. You can't abandon from the client but you can redirect to a page with server side script that will abandon.


<SCRIPT language="JavaScript">
window.parent.parent.location.href='default.asp';
</SCRIPT>


This will also break you out of any frames and redirect to default.asp. If you put a session.abandon at the beginning of the page you redirect to, it should do the trick. Keep in mind that the session timeout timer is restarted essentially any time the browser hits the server for anything so your countdown timer on the page is only valid while that page is up.