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

Your name:

Reply:


Posted by Jeremy Brown on 05/05/06 11:46

Thank you for the assistance.
Where in the would I put this script? Does it go into the existing script or
in a new one? As I said earlier, I a ignorant noob at scripting.

Jeremy

--
Visit my Saab & me at:
http://jerem43.home.att.net


"Michael Winter" <m.winter@blueyonder.co.uk> wrote in message
news:WMr6g.64211$wl.8160@text.news.blueyonder.co.uk...
> On 04/05/2006 18:58, Steve Pugh wrote:
>
>> "Jeremy Brown" <jerem43@att.net> wrote:
>
> [snip]
>
>>> <script language="javascript" type="text/javascript"
>>> src="http://ss.webring.com/navbar?f=j;y=jerem43;u=defurl">
>
> As the code is generated by an external site, modifying the markup is
> obviously out of the question. However, it is possible to alter the target
> attributes after the fact:
>
> function modifyWebringTargets() {
> var ring;
>
> if (document.getElementById
> && (ring = document.getElementById('webring'))
> && ring.getElementsByTagName) {
> var links = ring.getElementsByTagName('a');
>
> for (var i = 0; i < links.length; ++i) {
> links[i].target = 'webring';
> }
> }
> }
>
> <div id="webring">
> <script type="text/javascript"
> src="http://ss.webring.com/navba?f=j;y=jerem43;u=defurl">
> </script>
> </div>
>
> Call the function above after the document's loaded and the links should
> be sent to a new window.
>
> [snip]
>
>>> function SymError()
>>> {
>>> return true;
>>> }
>>>
>>> window.onerror = SymError;
>>>
>>> var SymRealWinOpen = window.open;
>>>
>>> function SymWinOpen(url, name, attributes)
>>> {
>>> return (new Object());
>>> }
>>>
>>> window.open = SymWinOpen;
>
> [snip]
>
>> That looks like it opens in a new window anyway (window.open being a
>> bit of a clue).
>
> Quite the opposite, actually. That's pop-up blocker code injected by a
> Symantec product (though I don't know why it's in the markup, in this
> case).
>
> If you care to take another look, notice that the open property is being
> assigned a reference to a new function, SymWinOpen. All this function does
> is return an object to make it look like the call succeeded.
>
> Mike
>
> --
> Michael Winter
> Prefix subject with [News] before replying by e-mail.

[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

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