Some time ago I found this script which enables you to open links in a new window. Typically links in html were something like this:
Mike's Site = <a href="http://www.mikesite.me" target="_blank">Mike's Site</a>
The instruction target=”_blank” was the one that make the link open in a new window. Now the W3C decided that you shouldn’t use that anymore. Browsers still support it, but if you want to html validate your site, that would throw you an error. So here is a little javascript function that fix that:
function externalLinks() {
if (!document.getElementsByTagName) return;
var anchors = document.getElementsByTagName(“a”);
for (var i=0; i var anchor = anchors[i];
if (anchor.getAttribute(“href”) && anchor.getAttribute(“rel”) == “external”)
anchor.target = “_blank”;
}
}
Usage: simply put in your links the attribute rel=”external” and include that function and then call it after all the document have been loaded with something like:
window.onload = externalLinks;
Hope that would help you, contact me if you need further indications. I would love to help
Me@mikesite.me