By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,460 Members | 1,167 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,460 IT Pros & Developers. It's quick & easy.

closing brower windows

P: n/a
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
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a


Obscurr wrote:
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.
...but that %// window just won't die!

any ideas?

obscurr


--

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

Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.