0
People I’m trying to pass my FORM + the OFFSET variable, but I’m not getting it.. Can someone give me an example?
$("#btn-pass").click(function() {
offset = offset + 5;
pagina++;
var data = $("#form-fatura").serialize();
data.push({
off: offset
});
$.ajax({
type: 'POST',
url: 'code-source/return/ret_info_fatura.php',
data: data,
async: true,
dataType: 'json',
beforeSend: function() {
$("#btn-pass").prop('disabled', true);
},
success: function(response) {
if (response.codigo == "1") {
$("#btn-pass").prop('disabled', false);
$("#btn-back").prop('disabled', false);
$("#container-fatura").html(response.fatura_animal);
$("#pagina").html("Página: " + pagina);
} else {
$("#btn-pass").prop('disabled', true);
offset = offset - 5;
pagina--;
$("#btn-back").prop('disabled', false);
}
}
});
});
I’ve tried too :\
– Marcos Vinicius Leão