Re: Re[2]: opening link in new window

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

 



On Sat, 2010-07-24 at 17:31 +0300, Andre Polykanine wrote:

> Hi Rob and all,
> 
>    Btw, is there a way to do window.close without any questions of a
>    browser? I know the only one: the window is generated via
>    window.open.
> 
> -- 
> With best regards from Ukraine,
> Andre
> Skype: Francophile; Wlm&MSN: arthaelon @ yandex.ru; Jabber: arthaelon @ jabber.org
> Yahoo! messenger: andre.polykanine; ICQ: 191749952
> Twitter: m_elensule
> 
> ----- Original message -----
> From: Robert Cummings <robert@xxxxxxxxxxxxx>
> To: Adam Richardson <simpleshot@xxxxxxxxx>
> Date: Saturday, July 24, 2010, 5:20:03 PM
> Subject:  opening link in new window
> 
> On 10-07-24 04:19 AM, Adam Richardson wrote:
> >
> > Code that resembled the below is how I used to open new windows before I
> > started using jQuery  Note, this completely avoids use of the target
> > attribute.
> >
> > function wireNewWindows(){
> >     if(document.getElementsByTagName){
> >        var anchors = document.getElementsByTagName("a");
> >        for(var i = 0; i<  anchors.length; i++){
> >           var node = anchors[i];
> >           if(node.getAttribute('rel') == 'external' ||
> > node.getAttribute('rel') == 'nofollow'){
> >              node.onclick = function(){
> >                 var url = this.href;
> >                 window.open(
> >                    url,
> >
> >   'newWin','width=700,height=500,Menubar=yes,Toolbar=no,Location=no'
> >                 );
> >                 return false;
> >              }
> >           }
> >        }
> >     }
> > }
> 
> I try to avoid window.open() due to the proliferation of popup blocking.
> 
> Cheers,
> Rob.
> -- 
> E-Mail Disclaimer: Information contained in this message and any
> attached documents is considered confidential and legally protected.
> This message is intended solely for the addressee(s). Disclosure,
> copying, and distribution are prohibited unless authorized.
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


If the window wasn't generated by a script on the same domain as the one
trying to close it, then the user will be prompted.

Thanks,
Ash
http://www.ashleysheridan.co.uk



[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