Data tables not working for Ajax response, giving e[i] is undefined. Not able to resolve issue ?
Data tables not working for Ajax response, giving e[i] is undefined. Not able to resolve issue ?
datatestlord
Posts: 6Questions: 3Answers: 1
var Table;
var Set;
function mainTable(){
Table = "";
Set = "";
$.ajax({
"url": "MyURL",
"type" : "POST",
"success": function(json) {
alert(JSON.stringify(json));
var tableHeaders;
$.each(json.columns, function(i, val){
tableHeaders += "<th>" + val + "</th>";
});
$("#Table").empty();
Set = json.data;
Table = $('#myTable').DataTable({
'responsive': true,
'scrollX': true,
'scrollY': '350px',
'data': Set,
'order': [1, 'asc']
});
},
"dataType": "json"
});
}
My json response is fine, but it is giving e[i] is undefined error ? Not able to solve this
This discussion has been closed.
Answers
resolved the issue.
Can you share your solution? I'm getting the same problem on some platforms with some browsers, but it works fine on others.
Hi @Boilermaker80 ,
That's odd you're only seeing it on some browsers, and some platforms, if this stuff works on one, I'd expected it to work on all others.
It would be worth creating a new thread and linking to your page, or creating a test case. 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
Aha, just saw that you did