I can not display the data to table with ajax datatable

I can not display the data to table with ajax datatable

saddam10saddam10 Posts: 1Questions: 1Answers: 0
edited March 2021 in Free community support

This my code. when i try print data on console, it's exist. but not showing on the table

 var table = $('#datatableAttendanceLog').DataTable({ 
        "processing": true, 
        "ServerSide": true, 
        "order": [], 
        "ajax": {
            "url": "<?= site_url($url) ?>/datatable",
            "type": "POST",
            success:function(data){
                console.log(data);
              },
        }
    });

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,599

    It looks like your server-side script isn't following serverSide protocol - for example the draw is missing. The protocol is discussed here. Also see examples here.

    Cheers,

    Colin

This discussion has been closed.