Shadark
Shadark

Reputation: 489

window.open opening tabs and windows in Google Chrome

I have this JS function who activates when a button is clicked:

function redirect() {
        win = window.open(\"$ref\", target=\"_blank\");
        win2 = window.open(\"$ref\", target=\"_blank\");
        win3 = window.open(\"$ref\", target=\"_self\");
}

First call to window.open opens a new tab in Chrome, second window.open opens a new window and the third window.open successfully "redirects" the original window to $ref.

My question is: why the first and the second window.open open both a tab and a window? Is there any way to open only tabs?

Upvotes: 6

Views: 2413

Answers (1)

Alex
Alex

Reputation: 11245

A have solved this problem and create a gist. It open 3 links in tabs.

Upvotes: 4

Related Questions