Answers for "how to refer variable array in ajax data in datatable"

3

send data in datatable ajax

$('#datatable').DataTable({
        order: [],
        responsive: true,
        autoWidth: false,
        processing: true,
        serverSide: true,
        ajax: {
            url: AJAX_URL,
            data(d) {
                d.parameter_name_1 = 'value';
              	d.parameter_name_2 = 'value';
            }
        },
        columns: [
          {
          ---}
        ]
});
Posted by: Guest on August-01-2020
1

passing data variable using ajax

var myVar = "test";

 $.ajax({
  url: "test.php",
  type: "POST",
  data:{"myData":myVar}
}).done(function(data) {
     console.log(data);
});
Posted by: Guest on May-06-2020

Code answers related to "how to refer variable array in ajax data in datatable"

Code answers related to "Javascript"

Browse Popular Code Answers by Language