1
Guys I set up a system that when typing the user name in an input, jQuery captures the name and calls a php file. Which in turn makes a BD query and fills a select list.
Well the structure is 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 on jQuery has to be that of the input
name
as it receives the
$("#cliente").val()
you do with$("#nome").val()
– William Aparecido Brandino
vlw thank you very much worked out ;)
– Hugo Borges