Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Making a window pop under in chrome

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.

like image 358
prgrmr Avatar asked Nov 23 '10 22:11

prgrmr


People also ask

How do I change the pop-up window block?

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.

Does Chrome have a built in pop-up blocker?

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.


2 Answers

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.

like image 119
Jason Benson Avatar answered Sep 22 '22 03:09

Jason Benson


The end of popunder is here. Chrome closed it yesterday.

like image 41
Chandler_bing_26 Avatar answered Sep 24 '22 03:09

Chandler_bing_26