HighDots Forums  

closing brower windows

Javascript JavaScript language (comp.lang.javascript)


Discuss closing brower windows in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Obscurr
 
Posts: n/a

Default closing brower windows - 09-26-2003 , 05:24 AM






hi,

I'm trying to close a browser window, from a window that has been
opened using the window.open method.
I've tried amongst others:
opener.close()
<windowname>.close()
top.close()
top.opener.close()


....but that ¤%// window just won't die!

any ideas?

obscurr

Reply With Quote
  #2  
Old   
Martin Honnen
 
Posts: n/a

Default Re: closing brower windows - 09-26-2003 , 05:55 AM








Obscurr wrote:

Quote:
hi,

I'm trying to close a browser window, from a window that has been
opened using the window.open method.
You can try
if (opener && !opener.closed) {
opener.opener = opener;
opener.close();
}
that should close the window with IE/Win and with Netscape 6 and 7.
Netscape 7.1 doesn't allow script to close a window that has not been
opened by script, and Netscape 4 will ask the user whether he wants to
allow the script to close the window.

Quote:
...but that ¤%// window just won't die!

any ideas?

obscurr
--

Martin Honnen
http://JavaScript.FAQTs.com/



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.