HTML Help Forum Index HTML Help
Please Search for the answer to your question before asking it! Thanks.
 

Base target="_blank" not working in IE or Chrome
Post a Reply to this Topic Ask a New Question
Click here to go to the original topic
       HTML Help Forum Index -> General HTML
View previous topic :: View next topic  
Author Message
Kullaroo



Joined: 05 Oct 2009
Posts: 1

Posted: Mon Oct 05, 2009 4:38 am     Base target="_blank" not working in IE or Chrome  

I'm trying to use the <base target="_blank"> to direct hrefs from a client-side image map. In Chromev2 and IEv8 the links open in the same tab. In Firefoxv3 they open in a new tab.

My search here only found the base target relating to frames; I don't know if this is the same problem or not. This used to work before we had tabbed browsers. Has the introduction of tabs changed the application of the <base target> tag?

My html is:
<base target="_blank">
<map name="volcmap">
<area shape="rect" coords="48,46,204,153" href="http://volcano.oregonstate.edu/volcanoes/volc_images/europe_west_asia/surtsey.html">
<area shape="rect" coords="0,66,26,227" href="sess2a_explode.html">
<area shape="rect" coords="95,283,378,309" href="sess2a_height.html">
<area shape="rect" coords="321,154,468,261" href="http://www.geo.mtu.edu/volcanoes/pinatubo/">
<area shape="rect" coords="172,155,318,274" href="http://www.swisseduc.ch/stromboli/">
<area shape="rect" coords="36,155,168,276" href="http://hvo.wr.usgs.gov/volcanowatch/">
<area shape="rect" coords="90,3,343,123" href="http://www.geo.mtu.edu/volcanoes/santamaria/">
</map>
<base target="_self">

I've used the closing base target to reset subsequent links to open in the source tab/window.

Am I doing something wrong or has IE dropped support for this and Chrome not adopting it?
PayneLess Designs



Joined: 28 Feb 2007
Posts: 3593
Location: Biloxi, MS

Posted: Mon Oct 05, 2009 5:24 am      

The target="" attribute is used for frames only or with HTML 4.01 Transitional document types. How browsers open links are up to the User's browser's settings and not yours. A right click on any link allows User to opt between opening a link in a new window or tab. This is as it should be.

There are PHP scripts which will force a new window. There is a JavaScript that can be inserted in each link to open in new window/tab: Code: Open new window:  onclick="window.open (this.href, ''); return false"

The base tag goes between the head tags anyway. I image you page is not going to validate which means you probably will not be cross browser compatible.
 
 
DARFUR
HOSTING / DESIGN
MAKE MONEY

       HTML Help Forum Index -> General HTML
Page 1 of 1


Powered by phpBB Search Engine Indexer
Powered by phpBB 2.0.19 © 2001, 2002 phpBB Group