Dajaxproject のアラート「問題が発生しました」をオフにするにはどうすればよいですか? 私のdajax関数は空のデータを返すことがあるため、htmlの変数はNoneです。私には合っていますが、dajaxアラートが表示されます。DAJAXICE_EXCEPTION があると聞いたことがありますが、それを適切に使用する方法がわかりません。ウェブサイトが一般的に完成したとき、あなたは何をしますか?
1 に答える
0
This is purely speculative, and I haven't tested this myself, but I think the place you want to look is in line 87 of dajaxice.core.js:
valid_http_responses: function(){
return {200: null, 301: null, 302: null, 304: null}
}
The section which throws errors is in line 51:
if(this.responseText == Dajaxice.EXCEPTION || !(this.status in Dajaxice.valid_http_responses())){
error_callback();
}
So maybe changing valid_http_responses
to:
valid_http_responses: function(){
return {200: null, 204: null, 301: null, 302: null, 304: null}
}
From Wikipedia:
204 No Content:
The server successfully processed the request, but is not returning any content
Maybe that will fix your issue?
于 2013-05-22T18:06:50.400 に答える