change ajax oprion before reolad
change ajax oprion before reolad
lbottoni
Posts: 5Questions: 4Answers: 0
Hi, i will change dataSrc before reolad or intercept result ajax call before datables does manipulation json
//first call json data
//{
//"aaData":[.....]
//}
vat table=jQuery("#xxx").DataTable();
table.ajax.url(".....");//change url work fine
//i muest chage because i read another json file with not the same structure
//new structure
//{
//files:[.....]
//}
table.DataTable({
"dataSrc":"files"
})
table.ajax.reload();//but i have always error :(
This discussion has been closed.
Answers
error is
datatables.all.min.js:159 Uncaught TypeError: Cannot read property 'length' of undefined