I'm trying to add a simple link to a help site to a navigation pane. Since the help site is external to the rest of the web application, I'd like to open the page in a new browser tab/window. Just add target="_blank"
as an attribute to the HTML <a>
tag, right?
The trouble is, only relative links get opened in the new window/tab for reasons that I cannot fathom. So,
<a href="helpsite.com/helpPage" target="_blank">Help</a>
opens the (broken) link in a new window. But if I try to use the absolute URL <a href="http://helpsite.com/helpPage" target="_blank">Help</a>
, the page will open in the same window.
This problem manifests across all web browsers (Mozilla Firefox, Google Chrome, and IE 9 tried). In IE, I notice that it looks like I'm temporarily on a blank page, then redirected to the help site. So, it's as though the browser is going through the normal procedure, but all in the same tab.
The problem also occurs when I click on the link with the middle mouse button, but not if I right-click and choose "Open link in new tab."
The page in question is part of a Grails application, built on Grails 2.0.1, but the code for the link in the gsp is plain ol' HTML. It happens no matter where I put the link--in my navigation template or in the middle of a basic GSP.
I've tried copy-and-pasting the link HTML into a plain text HTML file, and it works just fine. I'm not including any javascript I wrote, though our common site template that we use does include a common Javascript file used by almost all of our web apps and pages.
I am at my wits' end. Any thoughts?