closing brower windows

O

Obscurr

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
 
M

Martin Honnen

Obscurr said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,098
Messages
2,570,625
Members
47,236
Latest member
EverestNero

Latest Threads

Top