mmisiarek mmisiarek - 4 years ago 281
Ajax Question is blocked by browser when is called from promise

I have code like this:'',

This works fine when is called from any place of code, but when I use it in promise (see below), it is always blocked by browser. Any suggestions?

action().success(function (r) {

Promises are from angular.

Answer Source

The promise fires in response to you getting the HTTP response back from the Ajax request. That isn't a user triggered event, so popups are blocked. Use the window the user gives you instead of creating a new one.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download