Reputation: 10961
I need to popup a new window (not a dialog inside the page or similar) after a ajax call succeeds. window.open()
will be blocked by the popup blocker of browsers. So how to solve this?
Upvotes: 5
Views: 1422
Reputation: 306
You can call window.open() not inside success callback, but after ajax call has been completed (using async: false)
Upvotes: 4
Reputation: 262929
You probably should tell your users to whitelist your site in their browser's popup blocker.
Please realize that popup blockers would be useless if there was an easy way to do what you want, i.e. to circumvent them.
Upvotes: 1
Reputation: 70701
You can't. The best you can do is provide a notification link on the page when the call succeeds and open the popup when the user clicks on the link.
Upvotes: 1