Blocked and Unblocked Popup

I found that browsers do not block all JavaScript popups.

How to write pop-ups in JavaScript that will not be blocked by browsers?

I mean, what is the main factor that makes the difference?

+3
source share
2 answers

The main factor for deciding which pop-up will be blocked is that a good pop-up should be displayed after the user performs an action , for example, a click or other event, for example, press enter.

, JQuery UI Dialog, , html-, span div. . .

+4

Firefox ( - ) Javascript , , , .

, . . "" :

<a href="javascript:winopen('http://www.popuptest.com/popup3.html','blank','width=450,height=235,status=yes')">Good PopUp #1</a>
<br><br>
<A class=blu HREF="http://www.popuptest.com/popup2.html" target="_BLANK">Good PopUp #2</A>
<br><br>
<A class=black HREF="http://www.popuptest.com/popup3.html" onclick="NewWindow(this.href,'rank','450','450','yes','center');return false" onfocus="this.blur()">Good PopUp #3</A>
<br><br>
<a href="javascript:PopWindow('http://www.popuptest.com/popup4.html', 450, 320)">Good PopUp #4</A>
+7

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


All Articles