Nugs
asked on
Javascript popup based on application session timeout time.
Hey there guys,
I have been doing some searching on this and have found some scripts to do this but none of whihc seem to be accurate and variable to the appl;ication sessions timeout setting.
In my global.asax file on my application at the session_start portion of the site i emediatly set a few different session for use throughout the site. i wish to popup a alert window 60 seconds before my app sessions timeout.
Assume that i do not know the exact timeout minutes, what i am looking to do is pull this minute value from my app and into the javascript.
How please?
Nugs
I have been doing some searching on this and have found some scripts to do this but none of whihc seem to be accurate and variable to the appl;ication sessions timeout setting.
In my global.asax file on my application at the session_start portion of the site i emediatly set a few different session for use throughout the site. i wish to popup a alert window 60 seconds before my app sessions timeout.
Assume that i do not know the exact timeout minutes, what i am looking to do is pull this minute value from my app and into the javascript.
How please?
Nugs
ASKER
I get a sytax error on this... from these lines?
...
{
var now = new Date();
if (now=>timeout)
{
...
Nugs
...
{
var now = new Date();
if (now=>timeout)
{
...
Nugs
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks
Nugs
Nugs
<script>
var timeout = new Date();
timeout.setMinutes(timeout
var tId = "";
function check() {
var now = new Date();
if (now=>timeout) {
clearInterval(tId)
alert('One minute to timeout')
}
}
tId=setInterval('check()',
</script>