I'm doing a method that goes in the DB does a query and returns the codes.
With these codes I load Combobox
with their respective items.
There are times when it fits right in, there are times when it does not fill ... Any ideas?
$.getJSON("carrega.php?id_usuario=" + id_usuario + "&id_cord=" + id_cordao,function(data){
$.each(data.cord, function(i,user){
//Carrega o Combo com o Valor do BD
$('#cbo1').val(user.cord1);
$('#cbo2').val(user.cord2);
$('#cbo3').val(user.cord3);
$('#cbo4').val(user.cord4);
});
});
Funny that when I put a alert
before filling the Combo , it works:)