0
I am using the autocomplete function in a project, when local use everything goes well, but when host only the first field works:
$(document).ready(function(){
$("#cliee").autocomplete("../acoes/pesquisa/insertProjeto.php", {
selectFirst: false,
scrollHeight: 220
});
});
function habCampo(){
var proj = document.getElementById('cliee').value;
$("#projj").autocomplete('../acoes/pesquisa/insertTipoProjeto.php?i='+proj, {
selectFirst: false,
scrollHeight: 220
});
}
When first field is filled, it sends to function habCampo
the client id, which I try to pass to another page, to make a select, where the user will type and return only the projects that are linked to the client.
As I said, local works perfect, but in production does not work. Could you help me?
Have you tried using the absolute rather than relative URL? And when the function
habCampo
is called?– Woss
I have 2 fields, the first is parameter for the second, field CLIENT and field PROJECT, when I put the focus in the second field, it accesses the field haCampo bringing value of the first field CLIENT, so that you can select with this information and bring the data in the input for the user to choose.
– Esley Silva Marzin