2

I have the following code, to open a new web site:-

<li class="ms-comm-adminLinksListItem" unselectable="on"><a href="http://www.testURL.net/" target="_blank" unselectable="on"> Test  Web Site</a></li>

Currently using FireFox and Chrome the www.testURL.com will open on a new tab, while using IE it will open the www.testURL.com on a new window. So how I can force all web browsers to open the URL on a new tab ?

John John
  • 1
  • 72
  • 238
  • 501
  • You cannot change the behavior of browsers, for more info you can refer [here](http://stackoverflow.com/questions/3970746/html-how-to-force-links-to-open-in-a-new-tab-not-new-window) – Mr. Alien Sep 13 '13 at 10:49

2 Answers2

2

First of all, your code is correct. You are correctly telling the browser to open the link in another "view".

The way the browser interprets it being a new Tab or a new Window depends on different casuistics: the browser implementation, the capabilities of the platform and, in most cases, the user preferences.

Don't try to force it.

PA.
  • 28,486
  • 9
  • 71
  • 95
1

Opening in a tab or new window is dependent on how you are opening the link. If you are passing target as blank then it will follow browser's default behavior. To make it consistent across all browsers, you will need to open it as a popup.

Ganesh Pandhere
  • 1,612
  • 8
  • 11