JS Error when paging datatable with footer totals
JS Error when paging datatable with footer totals
Hi,
I'm using DataTables and love it! It always works and it's quite powerful. Any issues I have had sofar, I've always been able to sort out using the forum and examples. However, now I have an issue that I can't fix.
here's the situation:
- I have a DataTable which gets its data from a php file;
- I have a FooterCallBack function to display totals in 3 columns;
- I have enabled paging in the table.
Upon initial load, the table loads fine and the totals are displayed correctly. However, when I click to go to the next page, I get the following JavaScript error:
Error: aaData[aiDisplay[i]] is undefined
Here's some code excerpts:
[code]
"fnFooterCallback": function ( nRow, aaData, iStart, iEnd, aiDisplay ) {
var iKilometers = 0;
var iKilometersPage = 0;
var iUren = 0;
var iUrenPage = 0;
var iBedrag = 0;
var iBedragPage = 0;
for ( var i=0 ; i
I'm using DataTables and love it! It always works and it's quite powerful. Any issues I have had sofar, I've always been able to sort out using the forum and examples. However, now I have an issue that I can't fix.
here's the situation:
- I have a DataTable which gets its data from a php file;
- I have a FooterCallBack function to display totals in 3 columns;
- I have enabled paging in the table.
Upon initial load, the table loads fine and the totals are displayed correctly. However, when I click to go to the next page, I get the following JavaScript error:
Error: aaData[aiDisplay[i]] is undefined
Here's some code excerpts:
[code]
"fnFooterCallback": function ( nRow, aaData, iStart, iEnd, aiDisplay ) {
var iKilometers = 0;
var iKilometersPage = 0;
var iUren = 0;
var iUrenPage = 0;
var iBedrag = 0;
var iBedragPage = 0;
for ( var i=0 ; i
This discussion has been closed.
Replies