Reply to Re: Forcing a script to open a link in a new window or tab

Your name:

Reply:


Posted by Steve Pugh on 05/04/06 20:58

"Jeremy Brown" <jerem43@att.net> wrote:

>I have a small vanity site that is a member of WebRing. They give you a
>script to put on your site that will bring you to the next/previous/random
>site in the ring. I know absolutely nothing about scripting and I wish to
>force the script open the link in a separate window. Can anyone help me edit
>the script so that it will do this?

Why not let the user choose to open the links in a new window or tab
if they want to, and to not do so if they don't want to?

>Also, please forgive the HTML on the page, I am still learning. It will
>eventually be all Strict once I get CSS down pat.

Ah well, the easiest method of forcing a new window (regardless of
whether users want it or not) isn't allowed under the Strict versions
of HTML 4 and XHTML 1 so you have some conflicting goals here.


>Here is the script:
>
><!--Begin Webring Navigation-->
>
><script language="javascript" type="text/javascript"
>src="http://ss.webring.com/navbar?f=j;y=jerem43;u=defurl">
><!--//

Oh good, they're still catering for Netscape 1.0 era browsers that
don't understand script elements. Good for them. ;-)

>function SymError()
>{
> return true;
>}
>
>window.onerror = SymError;
>
>var SymRealWinOpen = window.open;
>
>function SymWinOpen(url, name, attributes)
>{
> return (new Object());
>}
>
>window.open = SymWinOpen;
>
>//-->
></script>

That looks like it opens in a new window anyway (window.open being a
bit of a clue).

Steve
--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <steve@pugh.net> <http://steve.pugh.net/>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация