I
I
IoanSolo2013-03-06 14:10:10
JavaScript
IoanSolo, 2013-03-06 14:10:10

How to open a link in a new tab in Google Chrome?

It is necessary after processing the data to open a new tab in the browser. In FF this code works correctly and opens a new tab, while in Chrome a new window opens. How to open a new tab in Chrome?
window.open(new_tab_link , '_blank')<br>

Answer the question

In order to leave comments, you need to log in

4 answer(s)
R
Roman, 2013-03-06
@lampa

Crutches have not been canceled:

<form action='link' id='form' target='_blank'></form>

and JS:
document.getElementById('form').submit();

S
Sergey, 2013-03-06
@Ualde

This is an immutable behavior of the browser if you or another user is configured to do so.
For me, for example, all links of this kind open in a new tab, and not in a new window.

V
Valery Selitsky, 2013-03-06
@WaveCut

Any opening of a window not initiated by the user (click, keyboard) is considered an advertising popup and is blocked if the site is not trusted.

G
GR0ST, 2018-09-27
@GR0ST

Chrome opens a tab without a pop-up blocker warning if the command to open the pop-up tab comes from a trusted event.
An example can be seen here
moxiemaks.ru/jquery/otkrytie-stranicy-oplaty-bez-z...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question