I'm writing standards compliant XHTML Strict 1.0, so including the HTML "target" attribute on anchor elements will not do.
I've read 2 fundamentally different ways using Javascript:
Upon document load, find all links with
rel='external'
and append thetarget='_blank'
attribute.Use the HTML
onClick
attribute that fires a Javascriptpopup(this)
function, which opens windows withwindow.open()
.
These methods are now 5-6 years old, so I'm hoping things have solidified since then. What's the best way to do this?