PDA

View Full Version : Automatic Closing Down IE After Inactivity


Starlight
09-10-2003, 03:16 PM
Hi,

How do I get Internet Explorer to automatically close when there has been a period of inactivity from the user - say 15 minutes?

I used the ASP "<% Session.Timeout = 15; %> but this does not seem to have an effect. Is what I want to do possible? I have seen other threads about using the Session object but it doesn't really cover my problem. I know that the JS "close();" command would be used to close a window that's the easy bit. The complex bit is detecting a period of inactivity from the user.

Any ideas or if you have done something like this before then let me know.

Many Thanks.

rsci
09-10-2003, 04:09 PM
Use a setTimeout("window.close()",900000);

for 15 minutes 900000=1000*60*15

oracleguy
09-10-2003, 04:55 PM
Just as a side note, the ASP timeout setting is the server side script timeout. aka how long it will allow the script to be processing before to timesout. And you can't close the window using a server side language because once the page is loaded there is no intereaction with the server until they request a different page.

Also in regard to what rsci said, in IE that will cause the "This page is attempting to close the window" dialog to come up and won't close the window until they click "OK"

Unless it is in a pop that your page generated.