Hi there,
can anyone help, I have some jquery and chrome is blocking the popup i am creating, after some investigation it appears to be an issue with window.open in sucess event of an ajax call.. Is there a way round this? My jquery ajax call needs to return the URL i need to open :-) ... so i am bit stuck...
If i place the open.window outside of the ajax call that it works, but inside (success) it is blocked... i think it is something to do with CONTEXT but i am unsure ..
Any ideas really appreciated... Thank you.
here is what i have
window.open("https://www.myurl.com"); // OUTSIDE OF AJAX - no problems
// with popup
$.ajax({
type: "POST",
url: "MyService.aspx/ConstructUrl",
data: jsonData,
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(msg) {
// Normally loads msg.d that is the url that is returned from service but put static url in for testing
window.open("https://www.myurl.com"); // THIS IS BLOCKED
},
error: function(msg) {
//alert(error);
}
});