Client Side Datatable is make null ajax call after Datatable is initialized.

Client Side Datatable is make null ajax call after Datatable is initialized.

ShakirbabaShakirbaba Posts: 2Questions: 1Answers: 0
$('#cost-data tbody').html(html); // This sets table body
if (! $.fn.DataTable.isDataTable( '#example2' ) ) {
        $('#example2').DataTable(
        {
            //processing: false,
            //serverSide: false,
            // searching: false, 
            paging: false, 
            info: false,
            columnDefs:[{
                "sortable":false,
                "targets":[0]
            }],
            order: [[ 1, 'asc' ]],

        }
    );
}

Once DataTable is initialized it makes an ajax call with null URI

Answers

  • ShakirbabaShakirbaba Posts: 2Questions: 1Answers: 0

    Screenshot of browser console.

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

    Hi @Shakirbaba ,

    DataTables wouldn't be making that call, since it's not been configured to make an ajax call. There must be something else on that page initiating the call, or a second DataTables initialisation.

    Cheers,

    Colin

This discussion has been closed.