Why is the table empty even though im getting data responce
Why is the table empty even though im getting data responce
pandaomi
Posts: 3Questions: 1Answers: 0
Im trying to populate a table with an ajax request, after the event fires, i can see in the console the responce i wnat to show, but the table only show the <thead> segment and where the data should be it says: "Proccesing"
tableFoo = $("#tablaExp").DataTable({
"processing": true,
"serverSide": true,
"ajax": function (data) { // Make the Ajax call ourselves
$.ajax({
url: "http://sae.dev/prestamo",
type: "GET",
dataType: "json",
data: {
draw: data.draw, // Needed for paging
start: data.start, // Needed for paging
length: data.length, // Needed for paging
func_id: func_seleccionado
},
})
},
"columns": [
{ "data": "first_name" },
{ "data": "salary" }
]
});
This discussion has been closed.
Answers
fix it. i wasnt returning aoColumns, recordsTotal, recordsFiltered from the server, i didnt read the documentation carefully enough