fnServerData doesn't load data

fnServerData doesn't load data

jumeba04jumeba04 Posts: 2Questions: 0Answers: 0
edited December 2013 in General
Hello,

I have a webpage where I create a datatable. The code to create the datatable is:

$('#table_id').dataTable({
"bJQueryUI": true,
"bFilter": false,
"aaSorting": [[1,'desc'],[2,'desc']],
"sPaginationType": "full_numbers",
"bdestroy": true,
"oLanguage": { "sEmptyTable": "No Events Registered"},

"sAjaxSource" : "/application/SeeEvents.do",
"bProcessing" : true,
"bServerSide" : true,
"fnServerData" : function(sSource, aData, fnCallback){
$.ajax({
"dataType": 'json',
"type": "POST",
"url": sSource,
"data": aData,
async: false,
"success": function(data){
if(data==null )
alert("It produced an error while the application was getting the latest events");
else
if(jQuery.isEmptyObject(data))
alert("There isn't any row");
else{
fnCallBack(data);
}
}
});
},

"fnDrawCallback": function() {
format();
},
"fnInitComplete": function(){
putEventOnClick();
}
});

Any data are loaded on the table (the function fnCallBack doesn't work)

Regards
This discussion has been closed.