| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| DesignersTalk > xhtml strict 1.1 not supporting target="new"? |
|
LinkBack | Thread Tools | Search this Thread |
|
|
#1 (permalink) |
|
Senior Member
Join Date: Jul 2004
Location: Ontario
Posts: 138
|
xhtml strict 1.1 not supporting target="new"?
Hey guys Im working on this website and Im making it strict xhtml1.1. Apparently target="new" isnt supported so anyone have any ways of getting around this without using javascript or anything? Thanks. |
|
|
|
|
|
#4 (permalink) |
|
senior member
Join Date: Sep 2005
Location: auckland, nz
Posts: 274
|
heres a simple js script, just put rel="external" in your link instead of target="_new" 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; |
|
|
|
#5 (permalink) |
|
Work faster microphone ..
Join Date: Feb 2003
Location: Cambridge, UK
Posts: 1,706
|
I think this is probably relevant: http://www.456bereastreet.com/archiv...pt_version_11/ |
|
|
|
#8 (permalink) | |
|
hmmm...
Join Date: Jan 2004
Location: Yorkuk
Posts: 2,130
|
Quote:
You're right about using xhtml 1.1 - only if necessary. But you're wrong about google. The code is progressively enhancing so google will happily pick up the content. As for size, an externally linked javascript is hardly going to matter much, it'll be cached after the first visit. And for a busy big site, if you add up every external links target attribute I'm sure it wouldn't take many before you'd actually be saving bandwidth with a script like that. |
|
|
![]() |