Getting above error while using server side datatable and here is My code
function getReports() {
/* document.getElementById("tableDiv").style.display = "block"; */
/* alert(from +" "+to); */
/* alert($("#input-datetimepicker2").val() + " " + $("#input-datetime2picker").val()); */
var table = $("#example").dataTable({
"bServerSide": true,
"bDestroy": true,
"sAjaxSource": "${pageContext.request.contextPath}/admin/AdminService?hdnmode=user_audit_trail_data&fromDat e="+ $("#input-datetimepicker2").val() +"&toDate="+$("#input-datetime2picker").val(),
"bProcessing": true,
//"sPaginationType": "full_numbers",
"bJQueryUI": true,
"sServerMethod": "POST",
"aoColumns": [
{ "mDataProp": "userName" , "sDefaultContent" : "" },
{ "mDataProp": "actionName" },
{ "mDataProp": "actionEvent" },
{ "mDataProp": "actionDescription" },
{ "mDataProp": "actionTime" },
{ "mDataProp": "actionStatus" }
],
"aLengthMenu": [
[5, 10, 50, 100,500, -1],
[5, 10, 50, 100,500, "All"]
],
"iDisplayLength" : 5,
});
for (var i=0; i< ParsedObject.length; i++) {
var temp_item = ParsedObject[i]; //new row data
table.fnAddData(temp_item.userName, temp_item.actionName, temp_item.actionEvent, temp_item.actionDescription, temp_item.actionTime, temp_item.actionStatus); //adds new row to datatable
}
}