0

In my html code there are several link like this:

<a href="www.exampe.com" target="_blank">example</a>

Is there a way to open these links in a new tab ( and not in a new window ) ?

xRobot
  • 25,579
  • 69
  • 184
  • 304

3 Answers3

1

You cannot control the preference the user has set in their browser. You might consider adding some text like

"Hold down the Ctrl key and click the following link"

If the user follows your suggestion, the page will open in a new tab. None of this is optimal.

See HTML: how to force open links in a new tab for more.

Community
  • 1
  • 1
DaveB
  • 9,470
  • 4
  • 39
  • 66
1

target="_blank" attribute should open that page in a new tab. It probably depends on your browser settings whether the page opens in a new tab or window.

Mike Burnwood
  • 279
  • 1
  • 2
  • 15
-1

There is no way to do this, short of a browser plugin.

That is for a reason. You do not want to take the user somewhere they don't want to be.

They may not want to be in Internet Explorer.

What you SHOULD do is suggest that your website may only be compatible with IE. This way, the user can only blame themselves if something does not work. Not ideal, but it's generally accepted practice.

Codeman
  • 12,157
  • 10
  • 53
  • 91
  • 2
    "Not ideal, but it's generally accepted practice": not a good practice, especially with jQuery available. It makes me very angry when I am forced to use IE for a silly website. Phooey on them! ;-) – Furbeenator May 22 '12 at 19:59
  • Well, I don't know the OP's original intent. It may very well be a silly security restraint that they are only allowed to use IE to access a page. This is not unheard of. – Codeman May 22 '12 at 20:17