Multiple ajax datatables on one page won't load on Firefox
Multiple ajax datatables on one page won't load on Firefox
majod
Posts: 4Questions: 0Answers: 0
Hello,
I am using datatables 1.9.4 and have multiple datatables on one page using this code:
[code]$('#clienttable').dataTable({
"bProcessing": true,
"bServerSide": true,
"sDom": '<"top"fp>rt<"bottom"pi><"clear">',
"sPaginationType": "full_numbers",
"bLengthChange" : false,
"aoColumns": [{"sWidth":"20%"},{"sWidth":"20%"},{"sWidth":"20%"},{"sWidth":"20%"}],
"iDisplayLength" : 10,
"aaSorting": [[0,"asc"]],
"fnCreatedRow" : function( nRow, aData, iDataIndex ) {
$('td',nRow).addClass('tablecellu');
},
"sAjaxSource": "datatables_dashboard_clients.php"
}).fnSetFilteringDelay();
$('#familytable').dataTable({
"bProcessing": true,
"bServerSide": true,
"sDom": '<"top"fp>rt<"bottom"pi><"clear">',
"sPaginationType": "full_numbers",
"bLengthChange" : false,
"aoColumns": [{"sWidth":"20%"},{"sWidth":"20%"}],
"iDisplayLength" : 10,
"aaSorting": [[0,"asc"]],
"fnCreatedRow" : function( nRow, aData, iDataIndex ) {
$('td',nRow).addClass('tablecellu');
},
"sAjaxSource": "datatables_dashboard_family.php"
}).fnSetFilteringDelay();
[/code]
As you can see both tables are using different ajax sources. But what is happening when I load the page is in Firefox I always get an error from one of the tables:
"DataTables warning (table id = 'familytable'): DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error"
There is absolutely no error in the data,because when I remove one of the datatables, the other one is always working. And also - both of the datatables are working perfectely on every browser, except Firefox. It's only Firefox which gives me this error (I tried Firefox 17 and 15), chrome and IE works fine with both of the tables. Any way to fix this?
Thank you.
I am using datatables 1.9.4 and have multiple datatables on one page using this code:
[code]$('#clienttable').dataTable({
"bProcessing": true,
"bServerSide": true,
"sDom": '<"top"fp>rt<"bottom"pi><"clear">',
"sPaginationType": "full_numbers",
"bLengthChange" : false,
"aoColumns": [{"sWidth":"20%"},{"sWidth":"20%"},{"sWidth":"20%"},{"sWidth":"20%"}],
"iDisplayLength" : 10,
"aaSorting": [[0,"asc"]],
"fnCreatedRow" : function( nRow, aData, iDataIndex ) {
$('td',nRow).addClass('tablecellu');
},
"sAjaxSource": "datatables_dashboard_clients.php"
}).fnSetFilteringDelay();
$('#familytable').dataTable({
"bProcessing": true,
"bServerSide": true,
"sDom": '<"top"fp>rt<"bottom"pi><"clear">',
"sPaginationType": "full_numbers",
"bLengthChange" : false,
"aoColumns": [{"sWidth":"20%"},{"sWidth":"20%"}],
"iDisplayLength" : 10,
"aaSorting": [[0,"asc"]],
"fnCreatedRow" : function( nRow, aData, iDataIndex ) {
$('td',nRow).addClass('tablecellu');
},
"sAjaxSource": "datatables_dashboard_family.php"
}).fnSetFilteringDelay();
[/code]
As you can see both tables are using different ajax sources. But what is happening when I load the page is in Firefox I always get an error from one of the tables:
"DataTables warning (table id = 'familytable'): DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error"
There is absolutely no error in the data,because when I remove one of the datatables, the other one is always working. And also - both of the datatables are working perfectely on every browser, except Firefox. It's only Firefox which gives me this error (I tried Firefox 17 and 15), chrome and IE works fine with both of the tables. Any way to fix this?
Thank you.
This discussion has been closed.
Replies