Read a lot of work to solve this method of the article, but for the Ajax request pop-up windows are useless, until you see this article only enlightened, in fact, is very simple, the following is copied over the article.
Window.Open is a JavaScript function, the function is to open a new window or this change the original window, but the general use is to open a new window, because the original web address can be modified to use window.location, you can redirect the page address, so that the page jumps to another page.
However, in general, if you call the window.open () function directly in JS to open a new window, the browser will block the popup window, because the browser will consider the window as pop-up ads and other users do not want to get the form, if you do not want to let the browser intercept, The solution is to change the window.open () function to be triggered by the user's active click, so the browser thinks the user wants to access the page instead of popping it directly to the user.
So the usual method is to add the onclick event to the hyperlink, such as
<a href= "javascript:void (0)" onclick= "window.open ()" ></a>
So the user clicks on this hyperlink, the browser will think it is open a new link, so it will not intercept.
But sometimes encounter want to pop up a window, but it is in the Onckick event after the execution, only to play out, such as the use of $. JSON, click to get the data, then jump to the new page, then it will be blocked by the browser, we can use the following method to avoid, is to first open a window with window.open, and then modify the window address.
As in $. JSON before defining the variable opens a window with the following code:
var tempwindow=window.open ();
And then to $. The address returned by JSON uses the following code to make the window jump to the specified URL, which renders the new window pop-up and will not be blocked by the browser.
tempwindow.location= '/jump/new ';
Change the address of the above jump to $. JSON returns the variable or page that you want to jump to.
Transferred from: Http://www.tuicool.com/articles/qaYzmey
Payment popup Blocker Solution