Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 866
Shadark Avatar asked Nov 20 '13 11:11

Shadark


1 Answers

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

like image 143
Pinal Avatar answered Oct 15 '22 20:10

Pinal