0

http://jsfiddle.net/Hiker9/ugwdeaoj/3/

Iterating over an array of URLs, opening each using window.open().

siteList = [
    'http://getfirefox.com/',
    'http://google.com/chrome',
    'http://getie.com/'];

$('.launch').click(function () {
    $.each(siteList, function (i) {
        window.open(siteList[i]);
    });
});

Works in Firefox (32) and IE (11), but Chrome (37) only opens the first URL.

Jim Cook
  • 13
  • 1
  • 1
  • 3
  • In Chrome 38 I get 1 new tab and 2 new popup windows. Are you blocking popups? – Alex K. Sep 29 '14 at 14:13
  • This is used in an intranet tool; installed browsers generally allow pop-ups and multiple windows from the domain. – Jim Cook Sep 29 '14 at 14:14
  • @alex-k, I dug into Chrome's settings, allowed pop-ups from [*.]domain.com, and got similar results. Trying to get all to open in the same window, new tabs. – Jim Cook Sep 29 '14 at 14:16
  • Seems unblocking the popups don't work, first is opened in a new tab, the other two are opened in new windows.. – Snellface Sep 29 '14 at 14:16

1 Answers1

1

I read your question as how to open more then 1 tab in chrome, the short answer is that you can't.
Only 1 new tab per user action, the rest will be opened in new windows and those are by default blocked by chrome, more info/answered here: window.open behaviour in chrome tabs/windows

Community
  • 1
  • 1
Snellface
  • 598
  • 5
  • 12