How can I make my table update automatically taking the value of two input
in JS
, I use JSON
, and can pass the parameters to the query the problem is that my table is not updated.
This is some code I use, researching I found that Bootstrap Table
uses the property "refresh" {query: {foo: 'bar'}}
.
How would you adapt it?
function actualizarTabla(datoFechaIni, datoFechaFin) {
obtenerTablaAjax('venta', '<?= base_url(); ?>index.php/modulos/supervisor/supinicio/datos_ventas', {
fechaIni: datoFechaIni,
fechaFin: datoFechaFin
}, '<?= base_url("assets/img/elems/loader.gif"); ?>');
}
function cargaInicial() {
$("#e-fechaInicio").change(function() {
actualizarTabla($("#e-fechaInicio").val(), $("#e-fechaFin").val());
});
$("#e-fechaFin").change(function() {
actualizarTabla($("#e-fechaInicio").val(), $("#e-fechaFin").val());
});
}