how to disable warning from datatables sErrMode seemd doesn't work
how to disable warning from datatables sErrMode seemd doesn't work
robbin1006
Posts: 2Questions: 0Answers: 0
I wonder how to disable warning issued by datatables。 I already know $.fn.dataTableExt.sErrMode is key, but I dont't know how to use it
. the code below:
$(document).ready(function() {
$.fn.dataTableExt.sErrMode = 'throw';
var oTable = $('#example').dataTable( {
"bProcessing": false,
"sAjaxSource": "sources/arrays.txt"
} );
} );
}
when I alter the arrays.txt content, arrays.txt is not valid, but the code does't work,cant you give me an example how to use $.fn.dataTableExt.sErrMode attribute to disable warning issued by datatables。
. the code below:
$(document).ready(function() {
$.fn.dataTableExt.sErrMode = 'throw';
var oTable = $('#example').dataTable( {
"bProcessing": false,
"sAjaxSource": "sources/arrays.txt"
} );
} );
}
when I alter the arrays.txt content, arrays.txt is not valid, but the code does't work,cant you give me an example how to use $.fn.dataTableExt.sErrMode attribute to disable warning issued by datatables。
This discussion has been closed.
Replies
So there are a number of options:
1. Modify that line in DataTables
2. Set your own fnServerData function which doesn't give an alert
3. Don't send invalid JSON :-)
Allan