So I have a very simple link that tries to open 2 new tabs:
function multipleTabs() {
window.open("http://firstlink/","_blank");
window.open("http://secondlink/","_blank");
return false;
}
<a href="javascript:void(0);" onclick="multipleTabs();">Open 2 tabs</a>
The issue is that when I click the link, the 2 tabs are opened fine but it appears another blank new tab, for a total of 3 new tabs.
How can I prevent the third blank tab to be opened?
Note: you have to allow the pop up in your chrome page to make this working
PS. the solution can be also just chrome specific as I don't use other browser for this page.