ajax post working in 10.4, upgrading to 10.5~10.12 suddenly stops working

ajax post working in 10.4, upgrading to 10.5~10.12 suddenly stops working

rururhunierururhunie Posts: 1Questions: 1Answers: 0

var btn = ['excel' , 'csv'];
var datatable = $('.serverside').DataTable({
lengthMenu: [[ 10,15, 30, 50, -1 ],[ 10,15, 30, 50, "All" ]],
paging: true,
pagingType: 'simple_numbers',
dom: '<"tab-tools"B>lfrtip',
buttons: btn,
serverSide : true,
"ajax" : {
"url" : $('.serverside').data("ajax"),
"type": "POST",
"contentType": "application/json",
"data" : function( d ){
d._token = csrf_token;
d.startdate = $('.serverside.table').data("startdate");
d.enddate = $('.serverside.table').data("enddate");
if($('.serverside.table').data("date"))d.date = $('.serverside.table').data("date");

            }
        },
        columns    : getCol($('.serverside.table').data("c")),
        columnDefs : getCol($('.serverside.table').data("d")),
    });

so, this code use to work at version 10.4, upgrading 10.5~10.12 makes the "data" : function(d) to stop working.
It's also requesting get instead of post. If there is a way to make the csv,excel,copy,print in 10.4, please somebody tell me how.

been trying to make this work for 6 hours now.

The data is working, the results are placed onto the table. but the dates are not being place with the input at the request.
also requesting get instead of post.

This discussion has been closed.