Serverside loaded data stuck on processing although valid Json provided
Serverside loaded data stuck on processing although valid Json provided
ryan_ram
Posts: 1Questions: 1Answers: 0
HTML
<table id="search">
<thead>
<tr>
<th>id</th>
<th>username</th>
<th>email</th>
</tr>
</thead>
</table>
JS
<script src="https://cdn.datatables.net/1.10.22/js/jquery.dataTables.min.js"></script>
<script>
let table= $('#search').DataTable( {
"processing": true,
"serverSide": true,
"ajax": {
"type":"post",
"url": "getIdx.php",
"data": function ( d ) {
d.group = "2",
}},
"columns": [
{"data": "id"},
{"data": "username"},
{"data":"email"}
]
} );
My returned JSON data is valid checked on JSONLINT
{
"draw": 0,
"recordsTotal": 3,
"recordsFiltered": 3,
"data": [{
"id": "292",
"username": "ryan",
"email": "testing@hotmail.com"
}, {
"id": "294",
"username": "patient2",
"email": "testing1@hotmail.com"
}, {
"id": "295",
"username": "patient5",
"email": "testing2@hotmail.com"
}]
}
The data is not loaded in the table , and the processing status remains stuck indefinitely
Console.log shows no errors
Any advice would be greatly appreciated
Ryan
This discussion has been closed.
Answers
Everything looks like it should. We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin