Hi Stefano,
I think your script is going in the rght direction,
just make sure that the timelimit for the variable is
less than the time limit set for session timeout.

You can work around the problem of writing the script
in each and every file, by putting it in a separate
file and including the file in all your pages.

HTH,
Parul

 --- Stefano Giberti <[EMAIL PROTECTED]> wrote: 
---------------------------------
I would like to know whether I can warn the user about
the expired 
session or application timeout, by displaying an
"inactivity" page.
As You know, the user notices that the session timeout
has expired 
only when he tries to move from the current (expired)
page, that 
doesn't change at timeout.

Scripts like the following do not solve the problem. A
script like 
that should be implemented in each and every page,
what I need is 
some strategy to let the session be aware of the
timeout and do 
something. That is, I would like a session
"On_Timeout" event, but 
there isn't any.

many thanks.

<body onload="countDown()" onchange="resetCounter()" 
onmousemove="resetCounter()" onclick="resetCounter()" 
onScroll="resetCounter()">
    <script>
    var seconds=300;
    function countDown() {
        if(seconds<=0) {
            document.location.href="inactivity.asp";
        }
    seconds--;
    window.setTimeout("countDown()",1000);    
    }
    function resetCounter() {
        seconds=300;
    }
    </script>
<script language="javascript"> 



________________________________________________________________________
Yahoo! India Matrimony: Find your partner online. 
http://yahoo.shaadi.com/india-matrimony/


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
     [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/
 

Reply via email to