While tidying up a project in Eclipse recently, I had an unexpected warning in a JSF XHTML file. The root cause, while fairly trivial is still for some interest to those trying to get the last dot and cross in place.
The code generating the warning was in itself not complex. Just a link with … wait for it! … a target=”_blank” tag. The age old and accepted way of opening a link in a new browser window. What could possibly be wrong with this I mused. The answer, in one word, is standards. Or to be more precise, Strict standards.
<a href="http://softwaresimian.com" target="_blank">Linky</a>
<a href="http://softwaresimian.com" onclick="this.target='_blank';">Linky</a>