I tried several things, but everytime Chrome (and others?) detect a pop up... is possible to bypass it ?
window.open(
'/test.php',
'_blank'
);
}, 2000);
I tried several things, but everytime Chrome (and others?) detect a pop up... is possible to bypass it ?
window.open(
'/test.php',
'_blank'
);
}, 2000);
Can you please try the code below?
//1000 = 1 second
setTimeout(function () {
window.open('url here', '_blank);
}, 1000);
You would have to open the window using javascript, then set a setTimeout
for two seconds that would wait for a variable to be set.
The new window would have to set a variable in the parent window to, lets say true.
Then with the setTimeout
runs, it checks whether the variable is true, and if not, then opens the link. If it is, then do nothing
var didItOpen = false;
window.open('page.html');
setTimeout(function () { if (!didItOpen) location.href = 'page.html'; }, 2000);