So, since W3C has ‘dropped’ the target=‘_blank’ attribute, I decided to look up another solution to ensure that my link would open up into a new window.
However, when i entered the code given in here: http://www.ajaxblender.com/open-links-new-window-w3c-valid-target-blank.html
in my header, when clicking on the link my page just opens in the same window. I have tried both options!
Then, someone suggested that i use this
'[I]function externalLinks(){if(!document.getElementsByTagName){return;}var anchors=document.getElementsByTagName(“a”);for(var i=0;i<anchors.length;i++){var anchor=anchors;if(anchor.getAttribute(“href”)&&(anchor.getAttribute(“rel”)==“external”||anchor.getAttribute(“rel”)==“external nofollow”||anchor.getAttribute(“rel”)==“nofollow external”)){anchor.target=“_blank”;}}}
externalLinks();
this is what you would use for the links…
<a href=“blah” rel=“external”>
or <a href=“blah” rel=“nofollow external”>
or <a href=“blah” rel=“external nofollow”>
any of those will open in a new window’[/I]
which resulted in having code showing as text in the header and didn’t even work anyway!
help?!!
this is the site for reference, i’m referring to the home page code http://www.ln-backups.co.uk/partsexport/