Abort error message displays?

Abort error message displays?

barcasam7barcasam7 Posts: 1Questions: 1Answers: 0

Hello,

I am working with databases to reload the ajax call as there is data being inputted. The data being inputted is a date which is selected by a datepicker. When a different date is selected the datatable will be reload the ajax call. However when it does this I get an error message saying "Abort".

See my code below:

$( document ).ready(function() {

    var productsTable;
    productsTable = $('#stafftable').DataTable({
     'ajax': {
        "type"   : "POST",
        "url"    : 'getEditDays.php',
    "data"   : function( d ) {
            // data to send through
            return $.extend( {}, d, {
                "datepicked" :  $("#datetimepicker").find("input").val(),
                "userID"     : $("#selecteduser").val()
            } );
        },
      "dataSrc": ""
    },
    "deferRender": true,
    'columns': [
    {"data" : "action"},
    {"data" : "addedOn"}
    ],
     // "oSearch": {"sSearch": "<?php ?>"},
      "order": [[ 1, "asc" ]],
      "iDisplayLength": 20,
      dom: '<"html5buttons"B>lTfgitp',

      buttons: [
      { extend: 'copy'},
      {extend: 'csv'},
      {extend: 'excel', title: 'ExampleFile'},
      {extend: 'print',
      customize: function (win){
        $(win.document.body).addClass('white-bg');
        $(win.document.body).css('font-size', '10px');

        $(win.document.body).find('table')
        .addClass('compact')
        .css('font-size', 'inherit');
      }
    }
    ],
});
    $('#datetimepicker').change(function() {
        productsTable.ajax.reload();

});
});

Answers

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 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

This discussion has been closed.