Warning dialog annoyance
Warning dialog annoyance
I met with the following situation quite a few times and felt a little inconvenient about the behavior.
I put an empty TABLE element on the page and then fill it with a JSON recordset.
During the development process, it happened that the DataTables column configuration did not match the number of columns from the JSON records. A warning dialog about that kept popping up. The JSON had quite hundreds of records. I could not do anything to stop the warning message boxes from showing up except terminating the process of iexplore.exe.
Is it possible to change the warning to show up just once during the initialization?
I put an empty TABLE element on the page and then fill it with a JSON recordset.
During the development process, it happened that the DataTables column configuration did not match the number of columns from the JSON records. A warning dialog about that kept popping up. The JSON had quite hundreds of records. I could not do anything to stop the warning message boxes from showing up except terminating the process of iexplore.exe.
Is it possible to change the warning to show up just once during the initialization?
This discussion has been closed.
Replies
However, it probably is reasonable to have this alert occur only once, rather than for every row which is in error. I'll look at making that modification.
Regards,
Allan
Would you consider removing "alert" as the default exception mode? I was a little surprised when I saw them come up on a production site, and had to step thru it to find the sErrMode property.
It would also be convenient if you could set sErrMode directly in the options object passed to dataTables() I was loading the dataTables script dynamically and didn't have a good way to set $.fn.dataTableExt.sErrMode beforehand.
Thanks for the plugin! S
Allan
Best.
$.fn.dataTableExt.sErrMode = 'throw';
$('#example').dataTable();
[/code]
should do it. If it doesn't can you link us to your test page please.
Allan
Allan
I keep getting this error message [quote]DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error[/quote] even though it is not a JSON parse exception. I wanted to test the functionality, wantedly I am not sending any data to the datatable to see if the statement [quote]$.fn.dataTableExt.sErrMode = 'throw'[/quote]will suppress the warning message. It is not suppressing the message for me, I am not sure how to handle this.
Allan
Allan