dataSrc not work? did i do something wrong?
dataSrc not work? did i do something wrong?
liwahadri
Posts: 2Questions: 1Answers: 0
hi i have a problem in 'dataSrc' that the information does not exist in the columns although I am sure of this path It stays on loading in a table
the arrays that i have in log
$('#table').DataTable({
"ajax":{
"url" : "https://******************?page=",
"dataSrc": "data",
"success" : function (data) {
console.log(data);
},
"error" : function(err) {
console.log(err);
}
},
columns: [
{ data: 'title' },
],
"lengthMenu": [ 5, 10],
"pageLength": 5,
"lengthChange" : false,
"pagingType": "simple_numbers",
});
Answers
nvm i'v fixed it. i have a question and i wondering if it is possible how i pass variable from dataSrc and then send it to the column?
I'm not sure what you mean. What is the intention with that variable?
Allan