I have a button that needs to open a new window as a popup (under the parent page). In IE/Firefox, it works fine, but in chrome the popup appears over (on top of) the parent window.
Please suggest a fix.
use case/eg: Well, for eg if you see kayak.com or any travel website, you have the ability to search on other websites too..I want to do something similar so need the pop under...
Code: I am using a window.open(.......).blur(), but for some reason it isnt working in chrome.
Chrome® on AndroidTap the three dots in the upper right-hand corner and select Settings. Scroll down to the Advanced settings and select Site settings. Select Pop-ups and redirects. Toggle the switch on or off depending on your preferences.
By default, Google Chrome disables pop-ups automatically in the browser; something easily overlooked because that's how the internet should be presented. Not all pop-up windows are malicious or invasive. Some websites use them for legitimate reasons.
I take back my comment, is possible.
The following worked for me. (tested latest production chrome)
var url = "yourURL.html";
window.open(url, "s", "width= 640, height= 480, left=0, top=0, resizable=yes, toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no").blur();
window.focus();
Like all things, if you annoy your visitors you will have less visitors.
The end of popunder is here. Chrome closed it yesterday.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With