[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

IE9: Problem with links with target = _blank when link points to a page on the same domain

Posted on 2011-03-17
8
Medium Priority
?
2,548 Views
Last Modified: 2012-06-27
With IE9 i have noticed that any links that use target="_blank" and point to the same domain end up opening a new blank tab.

So if the page at www.mydomain.com/index.html contains a link to www.mydomain.com/anotherpage.html with target="_blank", clicking on it results in a new blank tab.

Links to other domains that use target="_blank" work as expected. That is, they open up in a new browser window.

What is the simplest change I can make to make this work as expected across all of the popular browsers? This wasn't a problem with IE8.

I'm running Win 7x64 and of course, IE9.
0
Comment
Question by:ou81aswell
[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
  • 2
8 Comments
 
LVL 49

Expert Comment

by:Jackie Man
ID: 35162441
In IE9, goto Tools > internet Options > General > Tabs [Settings] > select "Always open pop-ups in a new window" instead of "let internet explorer decide how pop-ups should open".

Restart IE9 to test the results.
0
 
LVL 49

Expert Comment

by:Jackie Man
ID: 35162475
Please give the URL of your website for us to check your HTML code if you want to set the default option to "let internet explorer decide how pop-ups should open" instead of "Always open pop-ups in a new window".
0
 

Author Comment

by:ou81aswell
ID: 35162773
Thanks guys.

Here's an example page. Click on the "Online Forum" link. It's where it says

There are three types of support available:
-Online Forum
-Email: support
-Phone: (613) 569-4675 x 175

Here's the link.

http://www.informationactive.com/iacrm.cgi?x=show&j=147

With IE9 this opens a blank (white) tab.

The actual code for the link is

<li><a target="_blank" href="/forums">Online Forum</a></li>
0
Technology Partners: 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 49

Expert Comment

by:Jackie Man
ID: 35163044
You need to use JavaScript to open new window instead of HTML code because you declare the page to be XHTML 1.0 strict.

Details are as follows:

"In terms of Strict vs Transitional, the Transitional doctype won't punish you for omitting certain details or including deprecated attributes/tags. For example, the following is valid XHTML 1.0 Transitional, but not XHTML 1.0 Strict:

<a target="_blank" href="#">I open a new window</a>
Why? The target attribute is considered deprecated now, it is only present in the Transitional and Frameset doctype. This is probably one of the two big gripes people have with XHTML 1.0 Strict, you must use JavaScript to open new windows, but that makes sense to some degree. Much like you no longer use width, height, or valign in tables in favor of CSS, you no longer use target in links in favor of JS. Another big gotcha of Strict is that every img tag must contain an alt attribute, this is not true in Transitional.

That's all pretty straightforward and objective, though. Those are the big differences between the doctypes--which you choose to use is purely subjective: I personally use Strict in most of my documents because I don't see a reason not to use it."

Source: http://doctype.com/doctype-validation
0
 
LVL 49

Expert Comment

by:Jackie Man
ID: 35163087
Try to change the declaration header to the code below.

 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Open in new window

0
 
LVL 49

Accepted Solution

by:
Jackie Man earned 1000 total points
ID: 35163099
In short, IE9 behaves correctly according to the declared doc type while IE8 does not.
0
 

Author Closing Comment

by:ou81aswell
ID: 35163137
Understood. Thanks!
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 35164023
That is so insane. Thanks for the heads up
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Google currently has a new report that is in beta and coming soon to Webmaster Tool accounts. This Micro Tutorial will highlight new features for Google Webmaster Tools.
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

656 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