javascript error with multiple rows in a footer
javascript error with multiple rows in a footer
![bjenkins](https://secure.gravatar.com/avatar/2dc2b98ca0ce43cc4d3c0df7dc4703ff/?default=https%3A%2F%2Fvanillicon.com%2F2dc2b98ca0ce43cc4d3c0df7dc4703ff_200.png&rating=g&size=120)
i was getting this javascript error using DataTables 1.5.1 when my had multiple elements:
Error: oSettings.aoColumns[i] is undefined
Source File: jquery.dataTables.js
Line: 2175
here's the code around there:
[code]
/* Cache the footer elements */
var nTfoot = oSettings.nTable.getElementsByTagName('tfoot');
if ( nTfoot.length !== 0 )
{
iCorrector = 0;
var nTfs = nTfoot[0].getElementsByTagName('th');
for ( i=0, iLen=nTfs.length ; i
Error: oSettings.aoColumns[i] is undefined
Source File: jquery.dataTables.js
Line: 2175
here's the code around there:
[code]
/* Cache the footer elements */
var nTfoot = oSettings.nTable.getElementsByTagName('tfoot');
if ( nTfoot.length !== 0 )
{
iCorrector = 0;
var nTfs = nTfoot[0].getElementsByTagName('th');
for ( i=0, iLen=nTfs.length ; i
This discussion has been closed.
Replies
Thanks for posting your code! The trick here is that this will likely break the show/hide columns future of DataTables. That function wasn't really built with multiple TR elements in mind for the footer, although I can certainly see the advantage. I've added support for this to my to do list...
Regards,
Allan