2

I want a single click to open multiple links NOT as popups. I understand you cannot force a link to open in a tab but a solution that used to exist no longer behaviors ideally.

Main solution that is out there: http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_win_open6

function myFunction() {
    window.open("http://www.google.com/");
    window.open("http://www.stackoverflow.com/");
}

This works exactly as I would want in Firefox, and probably older versions of Chrome. The current version of Chrome opens the first link in the new tab and then treats all preceding links as popups.

There are also Chrome specific solutions out there and I do NOT want that, for obvious browser support reasons.

Dustin Clark
  • 92
  • 1
  • 9

1 Answers1

1

This looks to be working in Chrome:

<a href="http://www.google.com/" onclick="window.open('http://www.stackoverflow.com/');
return true;">multiopen</a>

Although, I'm sure there are more elegant ways to tailor this solution.

Source: How to make a link open multiple pages when clicked

Community
  • 1
  • 1
carlodurso
  • 2,886
  • 4
  • 24
  • 37
  • Thanks Carlo but doesnt seem to work for me in Chrome Version 38.0.2125.58 beta-m (64-bit). Also, I will want more than 2, which would put your solution in the same situation as the other poor solution. – Dustin Clark Sep 13 '14 at 19:01
  • 1
    on version 37.0.2062.120 works, but you're right about the limitations of that snippet. – carlodurso Sep 13 '14 at 19:07