Open New Windows Without A Target
I wanted to document this solution to a small, but irritating issue I have been having. As I make efforts to improve the standards compliance of the code my company turns out I often utlilize this blog to as a proving ground. As you can see in the right hand column I maintain this site as validating to XHTML 1.0 Strict standards. This often leaves me to abandon tried and true solutions that simply will not pass validation. It also pushes me to find new, standards compliant solutions to these issues.
One of the simplest matters I have had is in finding an acceptable method for opening links into new windows. Since the use of target is not an acceptable attribute within Strict standards nomenclature I have been left scratching my head for lack of a good solution.
Resolution
The resolution is at hand and it is documented in this Sitepoint article. This is a simple, JavaScript answer to this little puzzle. Although I am happy to have this solved, I really appreciate the attention to detail as the Sitepoint writer explains why this is a truly standards compliant solution, particularly as it relates to the governing Document Object Model (DOM).
It should be noted that this is in place within the links of this article.
Tags: dom, javascript



































