Galera I put up a system that when entering the user name in an input, jQuery captures the name and calls a php file. Which in turn makes a query in the DB and populates a select list.
Well, the structure looks like this:
function buscar_f_pagamento() {
var id = $('#cliente').val();
if (id) {
var url = 'Busca/Casas.php?id=' + id;
$.get(url, function(dataReturn) {
$('#load_f_pagamento').html(dataReturn);
});
}
}
<input type='text' id='nome' name="nome" value='1'>
<input name="cliente" id="cliente" onchange="buscar_f_pagamento()">
<select name='casa' id="load_f_pagamento"></select>
Well what I need to do is when I call the buscar_f_pagamento
in the input cliente
the value that has to be passed in jQuery must be the input
name