IE 7- Popup timer does not start until session tab is clicked on

S

Suresh Reddy

I am getting a strange problem with IE7 tabs.

The web application I am working (developed in ASP.Net, .Net 2.0), will show
a popup message with the count down timer 2 minutes before session time out.
The count down timer on popup will start with 120 and will be count down to 0
and if the user doesn't click on the Continue button (which is on popup),
application logs out and the web page will be shown with login page. If the
user clicks Continue button it extends the session for 20 more minutes.

Now the problem is, I have two tabs (or more tabs) on my IE7. One tab with
my application website and the other tab with xxxxx.com website and xxxxx.com
is active now. My website will not show the count down timer popup till it
gets activated. Once the application tab is actived even after 2 hours or two
days, then it starts the count down timer, till that time the session is
active. (That means somebody can keep the application session live for any
long time by opening one more tab besides it and new tab is active tab.)

So if my application is opened 2 hours ago and it is hidden by other tab, it
will not time out till I make the application tab as active tab. Once I make
the application tab active after 2 hours or 2 days it shows the count down
timer popup on which I can click on Continue to extend the session.

Can anybody know how to stop this behaviour. I can't remove the popup as per
the business.

Thanks in advance and any help will be greatly appricated.
 
A

Andy

How are you implementing the timer? Is it triggered by an onload
event? What is the event attached to? (body,etc)
 
S

Suresh Reddy

We will have following startup script on all the pages.
<script language='JavaScript'>startClock();updateClock(1200);>

startClock() records the current time and updateClock(1200) will be called
for 100 millisecs using setTimeOut() method.

startClock()
{
initalTime = new Date();
}

updateClock(timeOutValue)
{
setTimeout("updatePageClock('timeOutValue')");
untilTime = new Date().getTime() - initalTime.getTime();

if(timeOutValue == untilTime)
{
window.showModalDialog('timingout_countdown.html');
}
}

timingout_countdown.html - have the functionality of showing count down
timer and calls logout.aspx page when timer downs to 0 secs.

This was how it was implemented.

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,832
Latest member
GlennSmall

Latest Threads

Top