1
I’m having the following problem: I’m not getting to set the value in one input
when he’s inside a function
. Example:
$(document).on('click',".edita_cliente", function(){
var id = $(".seq").val();
$.ajax({
url: 'php/lista_clientes.php?service=2&id=' + id,
type: 'get',
dataType: 'json',
success: function (data) {
setTimeout(function(){
$("#content").load('cadastra_cliente.php');
$("#nome_cad").val(data[0].Nome);
}, 700);
}
});
});
This function, when I click the button, it closes the modal, loads the page. But it is not putting the value in the
input
. I tested from others shapes, and I realized he didn’t arrow any value in theinput
when you are within afunction
. Can someone explain to me why?Thank you in advance!
I was putting this delay, due to the time it has to close the MODAL. But that way it worked. Thanks (again)!
– Joao Pedro
@Joaopedro We are there! Dei +1 in your question tb. Abs!
– Sam