Debug Codes Added -- Uncaught TypeError: Cannot read property 'style' of undefined
Debug Codes Added -- Uncaught TypeError: Cannot read property 'style' of undefined
seamanjeff
Posts: 8Questions: 1Answers: 0
I wouldn't be able to get problem demonstrated in JS Fiddle without a few days work boiling it down to a trivial case -so I hope you can maybe help me anyway.
I am using DataTable with a table that I built in the DOM with some AJAX code. Then, I want to refresh the tables. When I call DataTables for the second time, after all the TRs have been deleted and added again, it dies like this:
[code]Uncaught TypeError: Cannot read property 'style' of undefined jquery.dataTables.js:3654
_fnCalculateColumnWidths jquery.dataTables.js:3654
_fnInitialise jquery.dataTables.js:2609
(anonymous function) jquery.dataTables.js:6793
jQuery.extend.each jquery.js:648
jQuery.fn.jQuery.each jquery.js:270
DataTable jquery.dataTables.js:6366[/code]
The call looks like this:
[code] scheduleTable.dataTable({
"bDestroy": true,
"bPaginate": true,
"bLengthChange": false,
"bFilter": false,
"bSort": false,
"bInfo": true,
"bAutoWidth": false,
"bJQueryUI": true
});[/code]
I am using DataTable with a table that I built in the DOM with some AJAX code. Then, I want to refresh the tables. When I call DataTables for the second time, after all the TRs have been deleted and added again, it dies like this:
[code]Uncaught TypeError: Cannot read property 'style' of undefined jquery.dataTables.js:3654
_fnCalculateColumnWidths jquery.dataTables.js:3654
_fnInitialise jquery.dataTables.js:2609
(anonymous function) jquery.dataTables.js:6793
jQuery.extend.each jquery.js:648
jQuery.fn.jQuery.each jquery.js:270
DataTable jquery.dataTables.js:6366[/code]
The call looks like this:
[code] scheduleTable.dataTable({
"bDestroy": true,
"bPaginate": true,
"bLengthChange": false,
"bFilter": false,
"bSort": false,
"bInfo": true,
"bAutoWidth": false,
"bJQueryUI": true
});[/code]
This discussion has been closed.
Replies
And here's the debug code after I hit refresh: efexih
Hope this helps.
Allan