Questions tagged [popup-blocker]

In web browsers, a popup-blocker is browser code that attempts to prevent annoying or disruptive unsolicited popup windows from polluting the display area.

Most browsers implement popup blockers by attempting to correlate user actions to window creation activities in script. If a window is opened by code that is responding to a mouse click event, the popup blocker allows the window to be shown.

If a window is opened in browser script that is not directly linked to a mouse click or other user input action, the popup blocker will probably prevent the window from being shown on the premise that the user didn't do anything to warrant a response from the app. Opening a window in a timer event handler, for example, will usually run afoul of popup blockers because there is little or no association between the timer event handler that opens the window and the user mouse click handler that created the timer event.

The definition of "proximity" of code to a user event varies by browser implementation. For example, Internet Explorer 6 would only allow code within a mouse click event handler or within about 2 nested call frames of a mouse click handler to open a popup window. In Internet Explorer 7, the nested function call tolerance was much greater, so long as the call chain originated in a mouse click event.

69 questions
187
votes
9 answers

Avoid browser popup blockers

I'm developing an OAuth authentication flow purely in JavaScript and I want to show the user the "grant access" window in a popup, but it gets blocked. How can I prevent pop up windows created by either window.open or window.showModalDialog from…
Pablo Fernandez
  • 94,980
  • 54
  • 180
  • 225
100
votes
10 answers

Bypass popup blocker on window.open when JQuery event.preventDefault() is set

I want to show a JQuery dialog conditionally on click event of an hyperlink . I have a requirement like on condition1 open a JQuery dialogue and if condition1 is not satisfied, navigate to the page as referenced by 'href' tag of whose click event…
mavaze
  • 1,197
  • 3
  • 9
  • 12
44
votes
7 answers

How do I prevent Google Chrome from blocking my popup?

On my website there is a button that just used to call a function that calls window.open, however, recently an adjustment was needed to do a server-side check before the popup was opened. Ever since the code was added that does the AJAX call,…
Aistina
  • 11,789
  • 12
  • 65
  • 87
40
votes
3 answers

Open new tab without popup blocker after ajax call on user click

I have a page that enable user to perform image manipulation via HTML5 canvas, on the page, there's a facebook share button for sharing a generated image of the canvas on facebook. When the link is clicked, an ajax request is sent to the server…
Syma
  • 564
  • 1
  • 4
  • 11
24
votes
5 answers

Pop up blocker API- how to check if user has it enabled

I need to know when the user clicks on the button that triggers window.open if there is stable API/way to know beforehand if the user actively has a pop-up blocker? In some cases the user doesn't know/pay attention that they have pop-up blocker…
John Jerrby
  • 1,553
  • 6
  • 26
  • 57
17
votes
6 answers

How do I detect popup blocker in Chrome?

I have searched many issue in stack overflow and might be duplicate here Detect Popup But not helped for me while testing in Chrome (tested v26.0.1410.64) Following Approach Worked in IE and Firefox but not in Chrome var popup =…
Surendra Jnawali
  • 2,912
  • 4
  • 25
  • 44
11
votes
1 answer

Check if pop-up blocker is enbled when open new tab

I want to open new window in new process/context in chrome, (Im not sure if it possible with window.open but with the following example its working ) currently if it was regular window you can check with the following example and to see if the…
user6171746
10
votes
7 answers

Popup blocking in Google Chrome causing issues with Capybara/Rspec tests

I'm writing some automated tests using Capybara/RSpec, I choose/configure the driver by using this little bit of ruby: Capybara.register_driver :selenium_chrome do |app| Capybara::Selenium::Driver.new(app, :browser => :chrome) end I'm testing…
The Sheek Geek
  • 3,884
  • 5
  • 35
  • 47
7
votes
1 answer

Why does Google Chrome's popup blocker shoot down a link when it contains an image or any other tag?

Google Chrome is a bit weird nowadays in that v25 no longer respects a 302 redirect header and happily re-posts form data on page refresh, whereas v24 and all the other browsers play nicely. I'm not sure if this is just a temporary browser bug, so…
Wabbitseason
  • 5,330
  • 9
  • 46
  • 57
6
votes
1 answer

chrome Pop-up blocker when to re-check after allowing page

I've having app which sometimes open the popup blocker, when the user run the application chrome have some flag in the url box (right side) which tell to the user that the pop-up is blocked ,in this case I give to the user in addition new warning…
user6124024
6
votes
1 answer

Paypal Embedded Flow - POP window blocked

I have successfully integrated Paypal Embedded Chained Adaptive Payment system. I have been testing it in sandbox environment. On GOOGLE Chrome, when user initiates the payment procedure, a light box gets opened with a login button inside it, but…
sandeep Kumar
  • 121
  • 1
  • 8
5
votes
1 answer

Browser.HtmlPage.Window.Navigate is blocked but HyperlinkButton isn't - why?

I have a certain UI element, which when clicked should navigate to another URL. I tried handling the mouse down event and execute something like this: System.Windows.Browser.HtmlPage.Window.Navigate(new Uri("http://google.com"),…
M.S
  • 1,542
  • 1
  • 13
  • 20
5
votes
4 answers

detect error: "popup_blocked_by_browser" for google auth2 in javascript

After lot of googling didn't find solution how to catch error of window popup blocker for google auth2 getting an error in console error: "popup_blocked_by_browser". all I want is to do is tell user that pop up should be enabled for auth. samples…
aleXela
  • 1,066
  • 1
  • 16
  • 29
4
votes
1 answer

How to download a PDF to a new tab/window without popup blocker?

I have the following service call to download files from the server. I currently have it so that PDFs will open up in a new tab/window, and any other document types will be downloaded. The problem I'm having right now is that the PDF is being…
Joey
  • 472
  • 1
  • 6
  • 21
3
votes
2 answers

Can I avoid making a synchronous callback, if I want a click to only *sometimes* open a new window?

In this scenario: User enters some information into a textbox User clicks a button Server-side processing of the entered information takes place Depending on the result of that server-side processing, either a new window is to be opened, or a…
AakashM
  • 59,217
  • 16
  • 147
  • 181
1
2 3 4 5