Uncaught TypeError: Cannot read property 'length' of undefined
Uncaught TypeError: Cannot read property 'length' of undefined
Ramprakash3
Posts: 5Questions: 1Answers: 0
how to solve this??
This discussion has been closed.
Answers
Uncaught TypeError: Cannot read property 'length' of undefined
This means the object you're trying to dereference is undefined, i.e.
undefined.fred
.thanks for reply,
im using pagination on serverside processing , that time i reached that error, and also pagination not working
in my dataTable contain,
serverside:true,
ajax:{
url : Myservelt,
data : {param0:abc,param1:***},
datasrc :function(xml)
{
thisTable.row.add(addingData).draw();
}
}
now i get that error
ncaught TypeError: Cannot read property 'length' of undefined
at xb (datatables.min.js:91)
at datatables.min.js:89
at i (datatables.min.js:87)
at Object.success (datatables.min.js:87)
at i (jquery-3.1.1.min.js:2)
at Object.fireWith [as resolveWith] (jquery-3.1.1.min.js:2)
at A (jquery-3.1.1.min.js:4)
at XMLHttpRequest.<anonymous> (jquery-3.1.1.min.js:4)
Thanks
Please see my response to your other question:
https://datatables.net/forums/discussion/48284/datatable-serverside-processing-with-xml-data#latest
Instead of
thisTable.row.add(addingData).draw();
you will need to convert the XML data to JSON format thenreturn
the converted data in yourajax.dataSrc
function. Take a look at the third example in the docs.Kevin