TypeError: headerCells[i] is undefined
TypeError: headerCells[i] is undefined
ethandy211
Posts: 3Questions: 2Answers: 0
hello,
sorry for asking help again but im having hard time to fix this one.
it says headerCells[i] is undefined
i look everywhere but i cant finsd a way to fix it. im just new using datatable
code:
$(document).ready(function() {
``$('#dragon').DataTable( {
"aoColumns": [
{ "mData": "ACNT_CODE", "bSortable": true ,"bSearchable": true},
{ "mData": "CNAME", "bSortable": true , "bSearchable": true},
{ "mData": "CADDRESS", "bSortable": true , "bSearchable" : true},
{ "mData": "TABLEID", "bSortable": true , "bSearchable": true },
{},
{}
],
"bProcessing": true,
"bServerSide": true,
"sAjaxSource":"serverside.php",
"fnServerData": function ( sSource, aoData, fnCallback, oSettings ) {
oSettings.jqXHR = $.ajax( {
"dataType": 'json',
"type": "POST",
"url": sSource,
"data": aoData,
"success": fnCallback,
"error": function (e) {
console.log(e.message);
}
});
}
});
} );
and my serverside.php:
https://www.datafilehost.com/d/28f8ce54
This discussion has been closed.
Answers
Hi @ethandy211 ,
We're happy to take a look. As per the forum rules, if you could link to a running test case showing the issue we can offer some help. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin