Large data handling problem in jquery data table, giving error

Large data handling problem in jquery data table, giving error

bhagyabhagya Posts: 6Questions: 3Answers: 0

var $table=$('#MCNRes').dataTable
( {
"bFilter": false,
"bDestroy": true,
"bJQueryUI": true,
"bServerSide": true,
"sDom": '<"H"l<"toolbar">Tfr>t<"F"ip>',
"ajax": {
url: 'getResult.php',
type: 'POST'
}

});

Server side data fetching and forming json string

$result = $afscpMcnMod->getMcnDetails();// function fetch data from DB
$newarray = array(
"draw" => $_POST['draw'],
"recordsTotal" => sizeof($result),
"recordsFiltered" => sizeof($result),
"data" => $result
);
echo json_encode($newarray);

Answers

  • bhagyabhagya Posts: 6Questions: 3Answers: 0

    the records size is more ,jquery data table not handling , it is not displaying any data.

    Data table warnings error

  • allanallan Posts: 64,076Questions: 1Answers: 10,566 Site admin

    Thanks for your question - however, per the forum rules can you link to a test case showing the issue please. This will allow the issue to be debugged.

    Information on how to create a test page, if you can't provide a link to your own page can be found here.

    Thanks,
    Allan

  • bhagyabhagya Posts: 6Questions: 3Answers: 0
    edited March 2016

    https://jsfiddle.net/6t7vexda/3/ This is my question and warning I am getting is

    Data table warnings: Table id 'MCNRes' invalid json response .

  • allanallan Posts: 64,076Questions: 1Answers: 10,566 Site admin

    Your JSFiddle shows that jQuery isn't being loaded.

    Perhaps I should have been more specific before. Please link to a test case that shows the problem so I can debug it.

    Allan

  • bhagyabhagya Posts: 6Questions: 3Answers: 0

    https://jsfiddle.net/6t7vexda/3/ This is my question and warning I am getting is

    Data table warnings: Table id 'MCNRes' invalid json response .

  • allanallan Posts: 64,076Questions: 1Answers: 10,566 Site admin

    The JSFiddle now has different syntax errors. For example there is HTML in the Javascript panel.

    Table id 'MCNRes' invalid json response

    Have you gone through the tech note that the error links to? If so, what is the data that is being returned form the server that is not valid.

    I'm afraid there is really little I can do unless I have a page that I can debug.

    Allan

This discussion has been closed.