Hi,
I’m currently trying to manage a session timeout with a 2 frames window.
In both frames I have forms, and my goal is to clear the timer and set it again every time any button on any of both frames is clicked.
Basically, how I handle this right now is:
In the parent’s frame:
[code]
<head>
<script language=”Javascript”>
var timer;
</script>
</head>
in the frames’ forms:
[code]
<form name=”myform” action=”myaction” method=”POST” onSubmit=”return resetTimer();”>
the resetTimer function:
[code]
function resetTimer()
{
var timerval;
parent.timer=clearTimeout(parent.timer);
timerval = GetCookie(“timer”) * 1000;
parent.timer=setTimeout(‘logout();’,timerval);
}
Now I would expect that this would affect the same timer from both frames, but it seems to consider two seperate timers from both frames. So if I set my timer for 1 minute and that I click on a button on frame1 then wait 30 seconds, click on a button on frame2, I’ll have a timeout after 30 more seconds (the 30 remaining seconds of the timer set by frame1) and it goes the same way around too…
Anyone has a clue what I may have done wrong?
thanks in advance