<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Javascript Popup with graceful fallback</title>
	<link>http://jake.cfwebtools.com/2008/03/26/javascript-popup-with-graceful-fallback/</link>
	<description>Jake Churchill on ColdFusion, FarCry, CSS, and much more...</description>
	<pubDate>Wed, 14 May 2008 02:28:08 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
		<item>
		<title>By: Sebastiaan</title>
		<link>http://jake.cfwebtools.com/2008/03/26/javascript-popup-with-graceful-fallback/#comment-109</link>
		<dc:creator>Sebastiaan</dc:creator>
		<pubDate>Fri, 28 Mar 2008 12:24:25 +0000</pubDate>
		<guid>http://jake.cfwebtools.com/2008/03/26/javascript-popup-with-graceful-fallback/#comment-109</guid>
		<description>That was a lot of code for such a simple thing ;-)
Here's a smaller, usable, accessible and CSS/HTML/JS compliant method:

function externalLinks() { 
 if (!document.getElementsByTagName) return; 
 var anchors = document.getElementsByTagName("a"); 
 for (var i=0; i&#60;anchors.length; i++) { 
   var anchor = anchors[i]; 
   if (anchor.getAttribute("href") &#38;&#38; 
       anchor.getAttribute("rel") == "external") 
     anchor.target = "_blank"; 
 } 
} 
window.onload = externalLinks;

All you do is add rel="external" to all your links (the image to the right of the link you fix via CSS, not JS). Best is to load this little piece of script at the end of the pageload.

Greetings from the Netherlands</description>
		<content:encoded><![CDATA[<p>That was a lot of code for such a simple thing <img src='http://jake.cfwebtools.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /><br />
Here&#8217;s a smaller, usable, accessible and CSS/HTML/JS compliant method:</p>
<p>function externalLinks() {<br />
 if (!document.getElementsByTagName) return;<br />
 var anchors = document.getElementsByTagName(&#8221;a&#8221;);<br />
 for (var i=0; i&lt;anchors.length; i++) {<br />
   var anchor = anchors[i];<br />
   if (anchor.getAttribute(&#8221;href&#8221;) &amp;&amp;<br />
       anchor.getAttribute(&#8221;rel&#8221;) == &#8220;external&#8221;)<br />
     anchor.target = &#8220;_blank&#8221;;<br />
 }<br />
}<br />
window.onload = externalLinks;</p>
<p>All you do is add rel=&#8221;external&#8221; to all your links (the image to the right of the link you fix via CSS, not JS). Best is to load this little piece of script at the end of the pageload.</p>
<p>Greetings from the Netherlands</p>
]]></content:encoded>
	</item>
</channel>
</rss>
