I am writing an application using Data-table plugin. I want to handle the error thrown by plugin by my function but plugin always show a alert box with error message.
In the page load event, I am creating a datatable plugin and registering a handler.
function callOnLoad()
{
$.fn.dataTable.ext.errorMode = "none";
auditViewTable = $("#div").on("error.dt",function(e, settings, techNote, message ){
console.log("error");
})
.DataTable({
"processing": true,
"serverSide": true,
"ajax": "getData",
"columns": [
{ "data": "events" },
{ "data": "id" },
{ "data": "name" },
{ "data": "obj_id" },
{ "data": "obj" }
]
});
}
Please help me where I am going wrong.