change ajax oprion before reolad

change ajax oprion before reolad

lbottonilbottoni Posts: 5Questions: 4Answers: 0
edited May 2016 in Free community support

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 :(

Answers

  • lbottonilbottoni Posts: 5Questions: 4Answers: 0

    error is
    datatables.all.min.js:159 Uncaught TypeError: Cannot read property 'length' of undefined

This discussion has been closed.