Re: Window close.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/7/06, Miles Thompson <miles@xxxxxxxxxxxxxxxxx> wrote:
>
>
> 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)
> }



Interesting, but this code seems to be exploiting a flaw in certain browsers
(Internet Explorer).  I believe the window.opener property is read-only in
Firefox and probably other browsers.  At the very least, I wouldn't rely on
this method.

Jason

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux