<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>john kelly - javascript</title>
    <link>http://blog.johnkelly.co.uk/</link>
    <description>blackrock consultants</description>
    <language>en-us</language>
    <copyright>john kelly</copyright>
    <lastBuildDate>Sun, 05 Feb 2006 13:45:18 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.2.8279.16125</generator>
    <managingEditor>mail@johnkelly.co.uk</managingEditor>
    <webMaster>mail@johnkelly.co.uk</webMaster>
    <item>
      <trackback:ping>http://blog.johnkelly.co.uk/Trackback.aspx?guid=2313cc58-8ec1-440e-88eb-6be3ded46fd6</trackback:ping>
      <pingback:server>http://blog.johnkelly.co.uk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.johnkelly.co.uk/PermaLink,guid,2313cc58-8ec1-440e-88eb-6be3ded46fd6.aspx</pingback:target>
      <dc:creator>Your DisplayName here!</dc:creator>
      <wfw:comment>http://blog.johnkelly.co.uk/CommentView,guid,2313cc58-8ec1-440e-88eb-6be3ded46fd6.aspx</wfw:comment>
      <wfw:commentRss>http://blog.johnkelly.co.uk/SyndicationService.asmx/GetEntryCommentsRss?guid=2313cc58-8ec1-440e-88eb-6be3ded46fd6</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
To have certain links opening in a new window (and to be HTML 4.0 &amp; XHTML 1.0
Strict compliant) use the following procedure:
</p>
        <p>
1.   Create text file "external.js" containing:
</p>
        <pre>function externalLinks() { 
<br />
 if (!document.getElementsByTagName) return; 
<br />
 var anchors = document.getElementsByTagName("a"); 
<br />
 for (var i=0; i&lt;anchors.length; i++) { 
<br />
   var anchor = anchors[i]; 
<br />
   if (anchor.getAttribute("href") &amp;&amp; 
<br />
       anchor.getAttribute("rel") == "external") 
<br />
     anchor.target = "_blank"; 
<br />
 } 
<br />
} 
<br />
window.onload = externalLinks;<br /></pre>
        <p>
and save this in a new directory "\scripts"
</p>
        <p>
2.   Edit header secion of "homeTemplate.blogtemplate" to contain:
</p>
        <pre>&lt;script type="text/javascript" src="scripts/external.js"&gt;&lt;/script&gt;</pre>
        <p>
3.    Using dasBlog's native editor (in HTML section) edit links to
be in the following format:
</p>
        <p>
&lt;a href="document.html" <strong>rel="external"</strong>&gt;external link text&lt;/a&gt;
</p>
        <p>
For example:
</p>
        <p>
          <a href="http://news.bbc.co.uk/" rel="external">BBC News site in new window</a>
        </p>
        <p>
 
</p>
        <font color="#ff0000">
          <strong>Update</strong>
        </font> Regardless of tab settings, in
Firefox links always seem to want to open in the same tab. The only way to force them
to open in a new tab is to include the javascript in the document rather than a link
to an external .js file.<img width="0" height="0" src="http://blog.johnkelly.co.uk/aggbug.ashx?id=2313cc58-8ec1-440e-88eb-6be3ded46fd6" /></body>
      <title>Open Links in New Windows</title>
      <guid isPermaLink="false">http://blog.johnkelly.co.uk/PermaLink,guid,2313cc58-8ec1-440e-88eb-6be3ded46fd6.aspx</guid>
      <link>http://blog.johnkelly.co.uk/2006/02/05/OpenLinksInNewWindows.aspx</link>
      <pubDate>Sun, 05 Feb 2006 13:45:18 GMT</pubDate>
      <description>&lt;p&gt;
To have certain links opening in a new window (and to be HTML 4.0 &amp;amp; XHTML 1.0
Strict compliant) use the following procedure:
&lt;/p&gt;
&lt;p&gt;
1.&amp;nbsp;&amp;nbsp;&amp;nbsp;Create text file "external.js" containing:
&lt;/p&gt;
&lt;pre&gt;function externalLinks() { 
&lt;br&gt;
&amp;nbsp;if (!document.getElementsByTagName) return; 
&lt;br&gt;
&amp;nbsp;var anchors = document.getElementsByTagName("a"); 
&lt;br&gt;
&amp;nbsp;for (var i=0; i&amp;lt;anchors.length; i++) { 
&lt;br&gt;
&amp;nbsp;&amp;nbsp; var anchor = anchors[i]; 
&lt;br&gt;
&amp;nbsp;&amp;nbsp; if (anchor.getAttribute("href") &amp;amp;&amp;amp; 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; anchor.getAttribute("rel") == "external") 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; anchor.target = "_blank"; 
&lt;br&gt;
&amp;nbsp;} 
&lt;br&gt;
} 
&lt;br&gt;
window.onload = externalLinks;&lt;br&gt;
&lt;/pre&gt;
&lt;p&gt;
and save this in a new directory "\scripts"
&lt;/p&gt;
&lt;p&gt;
2.&amp;nbsp;&amp;nbsp;&amp;nbsp;Edit header secion of "homeTemplate.blogtemplate" to contain:
&lt;/p&gt;
&lt;pre&gt;&amp;lt;script type="text/javascript" src="scripts/external.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;/pre&gt;
&lt;p&gt;
3.&amp;nbsp;&amp;nbsp;&amp;nbsp; Using dasBlog's native editor (in HTML section) edit links to
be in the following format:
&lt;/p&gt;
&lt;p&gt;
&amp;lt;a href="document.html" &lt;strong&gt;rel="external"&lt;/strong&gt;&amp;gt;external link text&amp;lt;/a&amp;gt;
&lt;/p&gt;
&lt;p&gt;
For example:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://news.bbc.co.uk/" rel="external"&gt;BBC News site in new window&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;font color="#ff0000"&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/font&gt; Regardless of tab settings, in
Firefox links always seem to want to open in the same tab. The only way to force them
to open in a new tab is to include the javascript in the document rather than a link
to an external .js file.&lt;img width="0" height="0" src="http://blog.johnkelly.co.uk/aggbug.ashx?id=2313cc58-8ec1-440e-88eb-6be3ded46fd6" /&gt;</description>
      <comments>http://blog.johnkelly.co.uk/CommentView,guid,2313cc58-8ec1-440e-88eb-6be3ded46fd6.aspx</comments>
      <category>dasBlog</category>
      <category>html</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>