ドキュメントによると、「エラー」ajax イベントは XMLHttpRequest オブジェクトに渡されますが、「成功」には渡されません。
http://docs.jquery.com/Ajax/jQuery.ajax
HTTP ステータス コードに正常にアクセスできるようにしたいので、これは残念です。私はエラーで成功しています。
error: function(data){
alert(data.status)
}
どんなリードも素晴らしいでしょう。
ありがとうございました。
ドキュメントによると、「エラー」ajax イベントは XMLHttpRequest オブジェクトに渡されますが、「成功」には渡されません。
http://docs.jquery.com/Ajax/jQuery.ajax
HTTP ステータス コードに正常にアクセスできるようにしたいので、これは残念です。私はエラーで成功しています。
error: function(data){
alert(data.status)
}
どんなリードも素晴らしいでしょう。
ありがとうございました。
この場合、成功後に発生するcomplete()コールバックを探します。
// A function to be called when the request finishes
// (after success and error callbacks are executed).
// The function gets passed two arguments: The
// XMLHttpRequest object and a string describing the
// type of success of the request. This is an Ajax Event.
complete: function (XMLHttpRequest, textStatus) {
this; // the options for this ajax request
}