PDA

View Full Version : security message when closing a window


hatton_james
11-11-2002, 08:22 PM
In my code I use the window.close() function and I reliased that when this is called in some browsers it throws up an ugly confirmation window saying
"The page you are viewing is trying to close the window..."

is there anyway to stop this happening so that the window just closes WITHOUT alerting the user?

James.

beetle
11-11-2002, 08:31 PM
Check out this thread (http://www.sitepointforums.com/showthread.php?s=&threadid=69983) at another forum on this very topic.

hatton_james
11-11-2002, 09:02 PM
Thanks for the reply. I read that thread, and it mentioned that it was possible to stop the warning message but didn't say HOW? I know that with the latest version of ie it doesn't warn you so long as that is not the last window (which is fine). However in some older versions it does throw this warning message....

so I guess my question is: if the user is using an old browser, how can I stop the warning message poping up when I close the window?

beetle
11-11-2002, 09:20 PM
Yes, the link to the method is in the very first post!

http://aspalliance.com/peterbrunone/impossible.asp