How to disable the warning message?
How to disable the warning message?
rajaaa
Posts: 21Questions: 10Answers: 2
Error: DataTables warning: table id=register - Requested unknown parameter '4' for row 0. For more information about this error, please see http://datatables.net/tn/4
How to disable this warning message by using the jquery.
i have used the coding.
$(document).ready(function() { $.fn.dataTableExt.sErrMode = 'throw'; $('#register').dataTable({ "order": [] }); });This question has accepted answers - jump to:
This discussion has been closed.
Answers
Want to hide the following error from my datatable
You don't really want to hide the error message. You want to fix what is causing the error. The error message is telling you that something is wrong and needs to be addressed.
Please link to the page showing the issue if you can't resolve it yourself from the tech note that the error message links so.
Allan
s can resolve the error. But in this case i have used colspan which has shows that error because its not supported at present.
But its working fine. So i thought to hide the warning message.
It won't be working fine, since as you say it is not supported. The error message is telling you that. Even if it appears to work, it will give unpredictable results for sorting, filtering, column visibility etc.
Allan
But the client need it as colspan and they okk even if its not working properly in sorting, filtering, column visibility they wants it without the warning alert.
Anyway Thanks allan.
However, imho this is very bad practice :-)
Allan
Thanks allan.
But its also makes the datatable not too work. And shows the error in the console.
Got worked i have used the datatables 1.10.2 version so it makes an error.
so i update the plugin. and used the following coding
$.fn.dataTable.ext.errMode = 'none';
$('#example').on( 'error.dt', function ( e, settings, techNote, message ) {
console.log( 'An error has been reported by DataTables: ', message );
} ) .DataTable();
$('#example').DataTable();