Shane,
One way around the problem is to use some _javascript_ and the rel="external" property.
Firstly, here is the _javascript_:
function externalLinks() {
if (!document.getElementsByTagName) return;
var anchors = document.getElementsByTagName("a");
for (var i=0; i<anchors.length; i++) {
var anchor = anchors[i];
if (anchor.getAttribute("href") &&
anchor.getAttribute("rel") == "external")
anchor.target = "_blank";
}
}
window.>
Shane Helm <[EMAIL PROTECTED]> wrote:
if (!document.getElementsByTagName) return;
var anchors = document.getElementsByTagName("a");
for (var i=0; i<anchors.length; i++) {
var anchor = anchors[i];
if (anchor.getAttribute("href") &&
anchor.getAttribute("rel") == "external")
anchor.target = "_blank";
}
}
window.>
Next, alter the <a> tag to include rel="external" instead of target="_blank".
I use this on my sites, it works fine and it validates.
Hope this helps,
John Fender
Shane Helm <[EMAIL PROTECTED]> wrote:
I have a site I am working on. All the pages I've created validate
except:
http://sonze.com/isl/res1.html
An external link to another site doesn't validate (line 40). I get
several errors. Is there anything I can do to make the page validate
or is it a lost cause since I don't control the external site I'm
linking to?
Thank you in advance.
Shane Helm
{ sonzeDesignStudio�
*****************************************************
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
*****************************************************
- [WSG] What to do when an External Link won't Validate? Shane Helm
- Re: [WSG] What to do when an External Link won't Valida... Sage Olson
- Re: [WSG] What to do when an External Link won't Valida... Amit Karmakar
- Re: [WSG] What to do when an External Link won't Valida... Ben Bishop
- RE: [WSG] What to do when an External Link won't Valida... JOHN FENDER
- RE: [WSG] What to do when an External Link won't Valida... Hill, Tim
