Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82540

Uncaught TypeError: Cannot read properties of undefined (reading 'length')

$
0
0

I am new to this forum and I want to request help with a problem that I have, messages that appear in the console and datatable does not show the data in the table, I will describe: the problem.

Uncaught TypeError: Cannot read properties of undefined (reading 'length')
at jquery.dataTables.min.js:4:32902
at Object.e [as success] (jquery.dataTables.min.js:4:25769)
at c (jquery-3.6.4.min.js:2:28447)
at Object.fireWith [as resolveWith] (jquery-3.6.4.min.js:2:29192)
at l (jquery-3.6.4.min.js:2:80176)
at XMLHttpRequest.<anonymous> (jquery-3.6.4.min.js:2:82630)

this is my js code

let tblAdmins;
document.addEventListener("DOMContentLoaded", function(){
tblAdmins = $('#tblAdmins').DataTable({
ajax: {
url: base_url + "/Admin/listar",
dataScr: ""
},
columns: [
{"data" : "id"},
{"data" : "usuario"},
{"data" : "nombre"},
{"data" : "clave"},
{"data" : "estado"},
]
});
})

this is my table

Id Usuario Nombre Clave Estado

Viewing all articles
Browse latest Browse all 82540

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>