Ajax jsonp callback function called before return of ajax call
The following seems to be the standard way to call a crossOrigin AJAX but the callback function is called as soon as the ajax call is made and crashes because the response is empty. What kinds of things could produce this behavior?
$.ajax({
dataType: "jsonp",
type: "GET",
async: false,
data: {
Oper: "C360LoginTestUnique",
LoginName: l,
UserName: u,
OldLoginName: o
},
error: function (xhr, status, error) { alert(error.message) },
success: CallbackFunction()
});
function CallbackFunction(response) {
var data = $.parseJSON(response);
var x = data["Success"];
};