[thelist] XHTML 1.0 Strict -no target attribute allowed?

Julia julia at juliadesigns.net
Sun Oct 24 06:45:30 CDT 2004

 > I use some Javascript that goes through the page and adds a
 > _blank Target to every external link it finds:

 > function outLinks(){
	var wlhref = window.location.href;
	var dlinks = document.links;
	for (var i=0; i<(dlinks.length); i++)
		if ((dlinks[i].href.indexOf(wlhref)==-1))
			dlinks[i].target = '_blank';
 > }

 > window.onload = function() {
 > }

Are you using the link rel=external as described in the Sitepoint article?
I am having trouble getting that to work in IE6, although it works 
beautifully in Mozilla. In IE it serves up a totally blank page for the 
page that has the script and links on it, although the source code is all 
there as it should be. I am off now to try another test page, in case I 
made an error on the original one causing IE to throw a hissy fit.
I used Dreamweaver to find and replace all target="_blank" with 
rel=external, and changed the doctype from XHTML 1.0 Transitional to XHTML 
1.1. This validated ok, and when I removed the javascript the page content 
appeared, although not exactly in the position it should have been.
Anyone else had any similar issues with IE, or is it just coder-error?

More information about the thelist mailing list