Uncaught TypeError: Cannot read property 'nTr' of undefined
Uncaught TypeError: Cannot read property 'nTr' of undefined
bootle
Posts: 5Questions: 0Answers: 0
Using Google Chrome 11.
Am new to DT, however have just started a project using 1.7.6, and is here:
http://www.bootleblog.com/test/
(click on markets, updates are every two seconds)
When I use the same code with 1.8.0 beta 3, get the error messages.
http://www.bootleblog.com/180beta3/
here's where the exception occurs...
[code]
for ( iRow=iStart ; iRow
Am new to DT, however have just started a project using 1.7.6, and is here:
http://www.bootleblog.com/test/
(click on markets, updates are every two seconds)
When I use the same code with 1.8.0 beta 3, get the error messages.
http://www.bootleblog.com/180beta3/
here's where the exception occurs...
[code]
for ( iRow=iStart ; iRow
This discussion has been closed.
Replies
I debugged into DataTables where the error was occuring, and noted iEnd becomes 11, not 4.
[code]
line 5876
function _fnGetTdNodes ( oSettings, iIndividualRow )
{
var anReturn = [];
var iCorrector;
var anTds;
var iRow, iRows=oSettings.aoData.length,
iColumn, iColumns, oData, sNodeName, iStart=0, iEnd=iRows; // <<<<< iRows = 4
/* Allow the collection to be limited to just one row */
if ( typeof iIndividualRow != 'undefined' )
{
iStart = iIndividualRow;
iEnd = iIndividualRow+1; // <<<<<<<<<<<<<<< iIndividualRow = "1", so "1" + 1 = 11, ooooops!
}
for ( iRow=iStart ; iRow
I hacked line 5891 to limit the loop to iRows, not iEnd. Does the trick for me, but no doubt there was a reason for calculating iEnd, so will leave it to you to update correctly, with your unit tests. Maybe need a new unit test in this area - how come it passed? ;-)
[code]
function _fnGetTdNodes ( oSettings, iIndividualRow )
{
var anReturn = [];
var iCorrector;
var anTds;
var iRow, iRows=oSettings.aoData.length,
iColumn, iColumns, oData, sNodeName, iStart=0, iEnd=iRows;
/* Allow the collection to be limited to just one row */
if ( typeof iIndividualRow != 'undefined' )
{
iStart = iIndividualRow;
iEnd = iIndividualRow+1;
}
// for ( iRow=iStart ; iRow
Regards,
Allan
Wow.Bang on! Thanks. Solved my issue I was passing string instead of int to fnUpdate