Click to See Complete Forum and Search --> : How to close parent window?


Howard Karten
11-20-2003, 12:41 PM
Can someone tell me a way to close a parent window without popping up a warning from MSIE asking if the user really wants to close it?

I used the window.close method in a parent window to close that window, after I launched a daughter window. I would like to be able to close that window when the user clicks on a button on the page, without triggering that MSIE alert.

If it can't be done with Javascript, does anyone know of a snippet of PHP code somewhere that might accomplish this?

Thanks in advance.

gil davis
11-20-2003, 01:27 PM
If you did not open the window with JavaScript, then you cannot close the window without the warning. It is a security feature of all browsers.

PHP does everything on the server side, and as such cannot possibly close a window on the client.

fredmv
11-20-2003, 01:38 PM
http://forums.webdeveloper.com/showthread.php?s=&threadid=21563#post111877