sLoadingRecords y sEmptyTable no working

sLoadingRecords y sEmptyTable no working

cenewtoncenewton Posts: 1Questions: 1Answers: 0

Hi, I am using Datatable and profit not to run the following properties. As I understand sLoadingRecords should show a message while the data is loaded and sEmptyTable should show a message in the absence of data for the query. I would appreciate any help. Thank you very much.
This is the code I used:

$(document).ready(function() {

var param = document.getElementById('valorCD').value;
var urlparam = "./Entidades/process.php?CD="+param;

$.ajax({
url: urlparam,
type: 'post',
data: { tagA: 'getData'},
dataType: 'json',
success: function (data) {
if (data.success) {
$.each(data, function (index, record) {
if ($.isNumeric(index)) {
var row = $("<tr />");
$("<td />").text(record.EAN).appendTo(row);
$("<td />").text(record.Categoria).appendTo(row);
$("<td />").text(record.Marca).appendTo(row);
$("<td />").text(record.Empaque).appendTo(row);
$("<td />").text(record.Bottler_Size_Liter).appendTo(row);
$("<td />").text(record.Bottler_Size_Unit).appendTo(row);
$("<td />").text(record.Sale_Unit_Per_Pack).appendTo(row);
$("<td />").text(record.Pack_Por_Capas).appendTo(row);
$("<td />").text(record.Capas_Por_Pallets).appendTo(row);
$("<td />").text(record.Pallet_Height).appendTo(row);
$("<td />").text(record.Pack_por_Pallet).appendTo(row);
$("<td />").text(record.MOQ).appendTo(row);
$("<td />").text(record.Unidad_Incremental).appendTo(row);

                        row.appendTo("#table1");
                        }
                    })
                }
                $('#table1').dataTable({
                //"bJQueryUI": true,
                //"bAutoWidth" :  false,
                //"pagingType": "full_numbers",
                //"scrollY": 300,
                //"scrollX": true,
                "bJQueryUI": true,
                "pagingType": "full_numbers",
                "scrollY": 300,
                "scrollX": true,
                "oLanguage": {
                    "sLengthMenu": "Mostrar _MENU_ filas por pagina",
                    "sZeroRecords": "Datos no encontrados",
                    "sInfo": "Mostrando _START_ a _END_ de _TOTAL_ filas",
                    "sInfoEmpty": "Sin entradas para mostrar",
                    "sInfoFiltered": "",
                    "sSearch": "Buscar",
                    "sProcessing": "Buscando...",
                    "sLoadingRecords": "Por favor espere - Cargando...",
                    "sEmptyTable": "No se obtuvieron datos",
                "oPaginate": {
                        "sFirst": "Primera",
                        "sPrevious": "Anterior",
                        "sNext": "Siguiente",
                        "sLast": "Ultima"
                        }
               }
                })

}
});
})

This discussion has been closed.