Chris Stratford wrote:
Hey guys, im just learning about XHTML sorry if this is Off Topic
it's not off topic - xhtml is a webstandard since years
How can you make a LINK open in a new window in XHTML??
there is no attribute "target"
you're using xhtml strict, you can still use xhtml transitional where the target attribute on links is allowed.
or you can use rel="external" and this 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.onload = externalLinks;i can't remember where i found it, i just remembered that i used it on a site about a half year ago.
regards, michael -- niij <http://niij.org/>
*****************************************************
The discussion list for http://webstandardsgroup.org/
*****************************************************
