Create an Account
username: password:
 
  MemeStreams Logo

Unconditionally closing the browser with IE

search

Acidus
Picture of Acidus
My Blog
My Profile
My Audience
My Sources
Send Me a Message

sponsored links

Acidus's topics
Arts
Business
Games
Health and Wellness
Home and Garden
Miscellaneous
Current Events
Recreation
Local Information
Science
Society
Sports
Technology

support us

Get MemeStreams Stuff!


 
Unconditionally closing the browser with IE
Topic: Technology 1:27 pm EDT, May 14, 2007

Closing Windows and Confirmation Boxes
Ever notice how a script that attempts to close a window will at times generate a confirmation and other times not?

Here's why: IE for windows and NN 4.x browsers do not allow a non-JavaScript-generated window with more than one page in its history to be closed without asking the user for permission via a confirmation box. In other words, scripts cannot close a main window unconditionally.

The MSIE Work Around
To determine whether or not a window is a main window, Internet Explorer checks to see if the window has an opener. Since windows that have openers can be closed unconditionally, the solution is to make Explorer think a main window has an opener. That is accomplished by giving a phantom opener a value, in this case, an empty string:

Something I didn't even know to go looking for before I read the IE7 release notes.

Unconditionally closing the browser with IE



 
 
Powered By Industrial Memetics
RSS2.0