Reputation: 489
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