Answer the question
In order to leave comments, you need to log in
How to bypass browser blocking?
Hello!
In general, the question is this, I need that when I open my site, the script opens two more pages from my own site. I hung up one link on the onclick event, the second one I try to call on a timer, but the browser blocks the pop-up window.
function open_url(){
var rrWindow = window.open('http://link1', 'rrpopunder', 'toolbar,status,resizable,scrollbars,menubar,location,height=200,width=500');
}
function url_linker() {
var hab = window.open('http://link2', 'rrpopunder', 'toolbar,status,resizable,scrollbars,menubar,location,height=200,width=500');
}
setTimeout(url_linker, 5000)
Answer the question
In order to leave comments, you need to log in
The browser will open a window if the user himself wants it, that is, clicks on a button, for example.
www.w3.org/TR/DOM-Level-3-Events/#trusted-events
https://learn.javascript.ru/window-methods
You can try to simulate clicking
www.ponedelnikov.net/click
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question