2

I have two links in my page with target="_blank", but if i open the first link in a new tab, when i click in the second, the page loads in tha tab that the first link are already open, i need to make they open in different tabs, not in the same. Thanks.

Add the code...

<ul style="float: left;">
    <li><a href='{external link}' target="_blank"><span>Help Desk</span></a></li>
    <li><a href='{external link}' target="_blank"><span>Bússola</span></a></li>
</ul>
evandrobm
  • 445
  • 1
  • 7
  • 17

2 Answers2

4

target="_blank" is the correct (and possibly the only) way to do this but how it behaves depends on the browser and browser settings.

See HTML: how to force links to open in a new tab, not new window for more details.

A workaround might be to give them different names like so:

<ul style="float: left;">
    <li><a href='{external link}' target="a"><span>Help Desk</span></a></li>
    <li><a href='{external link}' target="b"><span>Bússola</span></a></li>
</ul>

That should force the browser to open two new tabs and if you click the first link, then always the same frame will reload (same for the second tab).

Community
  • 1
  • 1
Aaron Digulla
  • 321,842
  • 108
  • 597
  • 820
1

Try with javascript function like this

Html:

<a href="javascript:void(0)" onclick="open_win()">Target</a>

Javascript:

<script>
function open_win() 
{
window.open("https://www.google.co.in/");
}
</script>

https://stackoverflow.com/a/18764547/1428854

Community
  • 1
  • 1
HasanAboShally
  • 18,459
  • 7
  • 30
  • 34