Re: Window close.
| From: | Miles Thompson | Date: | Tue, 07 Feb 2006 13:13:13 +0000 |
| Subject: | Re: Window close. | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-230041@lists.php.net to get a copy of this message | ||
At 03:42 AM 2/7/2006, Labunski wrote:
It can'tbe done with PHP, cause it must be client side script, aka Javascript: "javascript: window.close();" --Actually, expand it a little bit, and you avoid the JS Alert. function close_opener(){
parentwin = window.self; // Make handle for current window named "parentwin"
parentwin.opener = window.self; // Tell current window that it opened itself
parentwin.close(); // Close window's parent (e.g. the current window)
}
Can't take credit for it, had a similar problem years ago when I had to pop a window up to establish a session and immediately destroy it. And that was because I could not set a session from within Flash, nor access a session from Flash.
Regards - Miles Thompson
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.375 / Virus Database: 267.15.2/252 - Release Date: 2/6/2006