开发者

Popup a new window in an ajax success callback when popup blocker is on

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?


You can call window.open() not inside success callback, but after ajax call has been completed (using async: false)


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜