Solved

target="_blank" and IE7 -- I want a new tab, not a new window

Posted on 2009-04-10
8
525 Views
Last Modified: 2012-06-27
How come target="_blank" opens a new tab in Firefox and Chrome, but opens an entirely new window in IE7? Is there an alternate code that will open a page in a new tab in all tabbed-browsing-enabled browsers?
0
Comment
Question by:don0don
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
8 Comments
 
LVL 9

Expert Comment

by:dan_neal
ID: 24115999
Have you checked the tab settings in your IE environment.  I believe this is a user setting and cannot be forced.  If IE7+ is setup to launch links in new window instead of a new tab then there is nothing that can be done to stop this.
0
 

Author Comment

by:don0don
ID: 24116368
Hmmm .... that's interesting. IE7 is set to always open pop-ups in a new window. Are internal links -- links on one page of a web site pointing to another page on the same web site -- always regarded as a pop-up? If so, is this something that is determined by HTML rules or is it a browser-specific behavior? I would think it's the latter, since Firefox and Chrome don't seem to treat these links the same way.
0
 

Author Comment

by:don0don
ID: 24116542
Just out of curiosity, is there an alternative to the target="_blank" code -- similar to the way that title= is an alternative to alt=?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 9

Expert Comment

by:dan_neal
ID: 24116620
Not that I'm aware of.  Only alternative I can think of would be to use clientside scripting with the onclick event.
0
 

Author Comment

by:don0don
ID: 24116715
What are the advantages and disadvantages to that approach, as compared to using target="_blank"?

0
 

Author Comment

by:don0don
ID: 24120196
And I'm still wondering about internal links. Are internal links -- links on one page of a web site pointing to another page on the same web site -- always regarded as a pop-up? If so, is this something that is determined by HTML rules or is it a browser-specific behavior?
0
 
LVL 9

Accepted Solution

by:
dan_neal earned 125 total points
ID: 24120350
Unless a link has a target that is other than self or undefined, the rendered page is opened to the same window/tab as the calling page.  Only links that have a target defined as _new or _blank are considered pop-ups as they are displayed while the current page is left unchanged.
0
 

Author Comment

by:don0don
ID: 24120608
And how would the link be regarded if I used clientside scripting with the onclick event?

Are there any downsides to using that method?
0

Featured Post

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question