Answer the question
In order to leave comments, you need to log in
How to get jQuery ajax working in ie8/9?
Making a cross-domain request
function AjaxFormRequest () {
$.ajax({
type: "POST",
crossOrigin: true,
dataType: "json",
contentType: "application/json",
url: "http://site.com/api/TestCall",
data: '{"arg1":"sad","arg2":"tgt"}',
success: function (response) {
if (response['error']) {
alert("Сервер вернул ошибку: " + response['error']);
} else {
alert("Сервер вернул нечто: " + response);
}
},
error: function (jqXHR) {
console.log("jQuery свалился в собственный error. readyState: " + jqXHR.readyState);
}
});
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question