データテーブル ajax 呼び出しの成功で JavaScript 関数を呼び出すことは可能ですか。使用しようとしているコードは次のとおりです。
var oTable = $('#app-config').dataTable(
{
"bAutoWidth": false,
"bDestroy":true,
"bProcessing" : true,
"bServerSide" : true,
"sPaginationType" : "full_numbers",
"sAjaxSource" : url,
"fnServerData" : function(sSource, aoData, fnCallback) {
alert("sSource"+ sSource);
alert("aoData"+ aoData);
$.ajax({
"dataType" : 'json',
"type" : "GET",
"url" : sSource,
"data" : aoData,
"success" : fnCallback
});
}
次のようなものを持つことは可能ですか?
success : function(){
//.....code goes here
}
"success" の代わりに: fnCallback ------> AJAX 呼び出しの最後の行です。この関数では、サーバー側から送信された値を確認したいと思います。助けてくれてありがとう....