How to open a popup without blocking it?

I did not find a single answer that could tell me how to open the popup correctly.

Times have changed, and pop-ups have been largely replaced by frame boxes. However, there are still times when a popup is required.

In these cases, I do not want my pop-ups to be blocked by browsers.

What is the right way to open a popup without blocking it? Even if it opens a new tab in the browser. I just want the popup to be open and to control it from the parent or vice versa.

+4
source share
2 answers

, - .

, , , - , ( ) .

:

  • , -

:

  • target = "_ blank"

JavaScript:

  • window.open, , window.open. W3Schools.
  • , window.opener. .
+4

,

$('#myButton').click(function () {
    var redirectWindow = window.open('http://google.com', '_blank');
    redirectWindow.location;
});

Js https://jsfiddle.net/safeeronline/70kdacL4/2/

ajax, . http://jsfiddle.net/safeeronline/70kdacL4/1/

+1

Source: https://habr.com/ru/post/1523331/


All Articles