Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Markup (HTML, XHTML, XML) _ Links opening in new tab from image map

Posted by: samushighwind Jun 8 2010, 11:58 AM

Hi,

I'm building a site for my band and I have an image map at the top of the page to link to my different sites.

The website is at http://theaugmentedfive.bandcamp.com/ and the code I'm using for the image map can be found below:

CODE
<area shape='rect' coords='353,121,568,175' href='http://www.youtube.com/user/TheAugmentedFive' alt='The Augmented Five's YouTube Channel' target='”_blank”' title='The Augmented Five's YouTube Channel'>

<area shape='rect' coords='625,121,942,175' href='http://www.reverbnation.com/theaugmentedfive' alt='The Augmented Five on ReverbNation' target='”_blank”' title='The Augmented Five on ReverbNation'>

<area shape='poly' coords=& #39;10,10,964,10,964,143,945,143,945,121,627,121,625,144,571,145,571,122,352,122
,353,143,275,144,276,122,28,121,27,143,10,145,' href='/' alt='Home'  title='Home'>

<area shape='rect' coords='27,121,273,175' href='http://www.facebook.com/pages/The-Augmented-Five/103802459664369' alt='The Augmented Five on Facebook' target='”_blank”' title='The Augmented Five on Facebook'>

My problem is that by using target="_blank", the links I click DO open in new tabs (note the polygonal link is not supposed to open in a new tab). However, if I click multiple links in one go, the new clicks will simply replace whatever page just loaded in the "_blank" page. I'm trying to be able to click Facebook, YouTube, and ReverbNation to get three new tabs with those pages open.

Any type of help would be appreciated. Thanks!

Posted by: pandy Jun 8 2010, 12:29 PM

CODE
target='”_blank”'


You have two sets of quotes. One is enough. What happens is that the browser sees the value of target at "_blank" (with the quotes) instead of simply _blank. It treats the new window as a named window and reuses it every time a link with the same target is clicked, same as it would had you used target="pandy" that isn't predefined either (a pure oversight, I'm sure happy.gif ).

Furthermore the double quotes look like smart quotes from Word or the like. They don't belong on the Web (or anywhere outside Office).

The validator finds more mistakes that you should correct.
http://www.htmlhelp.com/cgi-bin/validate.cgi?url=http%3A//theaugmentedfive.bandcamp.com/&warnings=yes&input=yes

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)