Cargar una datatable en un modal

Cargar una datatable en un modal

jgaitanmartinezjgaitanmartinez Posts: 1Questions: 1Answers: 0
edited October 2019 in Free community support

I have a view that lists all active loans, in this one I have a button that opens a modal to visualize the amortization of the selected loan, the problem that I have is that when I click on the button I do not load the datatable.
this code calls the datatable, ajax returns the correct values

$(".tablaPrestamos tbody").on("click", "button.btnVizualizarPrestamos", function(){
    var idPrestamo = $(this).attr("idRegistro");
    $('.tablaAmortizacion').DataTable({
            "ajax": "ajax/datatable-amortizacion.ajax.php?idPrestamo="+idPrestamo,
            "deferRender": true,
                "retrieve": true,
                "processing": true,
                "searching": false, 
                "paging": false,
                "info": false,
        });
})


Edited by Kevin:  Syntax highlighting. Details on how to highlight code using markdown can be found in this guide

Answers

  • kthorngrenkthorngren Posts: 21,166Questions: 26Answers: 4,921
    edited October 2019

    Do you see any errors in the browser's console?

    What is the JSON response shown in the browser's Developer Tools > Network tab?

    When I've seen Loading... (Cargendo...) its due to either an error shown in the browser's console or a problem with the response data.

    Kevin

This discussion has been closed.