Ich habe folgendes Ajax-Anforderung:
jQuery.ajax({
async: true,
type: "GET",
url: url,
data: data,
dataType: "json",
success: function(results){
currentData = results;
},
error: function(xhr, ajaxOptions, thrownError){
if (xhr.status == 200) {
console.debug("Error code 200");
}
else {
currentData = {};
displayAjaxError(xhr.status);
}
}
});
Aus irgendeinem Grund der Fehler Callback-Ereignis aufgerufen wird, wenn der HTTP-Statuscode 200, dh ist. Die Anfrage ist in Ordnung. Warum ist das?
Ich habe das getestet und es scheint, dass es nichts ausmacht. Es funktioniert (wenn es funktioniert ks) mit und ohne Content-Type-Deklaration. – kosoant
hmmm vielleicht war das die prototype library nicht jquery dann – Greg