zeroRecords lenguage not working

zeroRecords lenguage not working

alderhernandezalderhernandez Posts: 33Questions: 11Answers: 1
edited January 2017 in Free community support

i have a input text for search in 4 diferents table but zeroRecords lenguage dosn't work

here is mi 4 initialisation

$('#tblCatalogo1,#tblCatalogo2,#tblCatalogo3,#tblCatalogo4').DataTable({
            //"scrollY":        "280px",
            "scrollCollapse": true,
            "paging":         false,
            "info":    false,
            "zeroRecords": "NO HAY RESULTADOS",
            "lengthMenu": [[5,10,50,100,-1], [5,10,50,100,"Todo"]],
            "language": {
                "paginate": {
                    "first":      "Primera",
                    "last":       "Última ",
                    "next":       "Siguiente",
                    "previous":   "Anterior"                    
                },
                "lengthMenu": "MOSTRAR _MENU_",
                "emptyTable": "No hay datos disponibles en la tabla",
                "search":     "BUSCAR"
            }
        });

here is mi input text for search

$('#searchCatalogo').on( 'keyup', function () {
    var table = $('#tblCatalogo1,#tblCatalogo2,#tblCatalogo3,#tblCatalogo4').DataTable();
    table.search(this.value).draw();
});

what is wrong?

This question has accepted answers - jump to:

Answers

  • allanallan Posts: 63,552Questions: 1Answers: 10,477 Site admin
    Answer ✓

    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

  • allanallan Posts: 63,552Questions: 1Answers: 10,477 Site admin
    Answer ✓

    Oh - and put zeroRecords into your language object :smile:.

  • alderhernandezalderhernandez Posts: 33Questions: 11Answers: 1
    edited January 2017

    @allan , thanks men thats solved mi problem, is working now, sorry..... mi mistake
    $('#tblCatalogo1,#tblCatalogo2,#tblCatalogo3,#tblCatalogo4').DataTable({ //"scrollY": "280px", "scrollCollapse": true, "paging": false, "info": false, "lengthMenu": [[5,10,50,100,-1], [5,10,50,100,"Todo"]], "language": { "zeroRecords": "NO HAY RESULTADOS", "paginate": { "first": "Primera", "last": "Última ", "next": "Siguiente", "previous": "Anterior" }, "lengthMenu": "MOSTRAR _MENU_", "emptyTable": "No hay datos disponibles en la tabla", "search": "BUSCAR" } });

This discussion has been closed.