This calls and changes the values
<select width="100" name="produto" id="produto-list" class="produtoInputBox" onChange="getapolice(this.value);" <?php echo $permissao; ?> >
i have this function
function getapolice(val1,val2) {
$.ajax({
type: "POST",
url: "caixa/inc/get_apolice.php?id='<?=$_GET['id']?>'",
data:'com_id='+val1+'&produtname_id='+val2,
success: function(data){
$("#apolice-list").html(data);
}
});
}
Whit this i get com_id = "i get value" and produtname_id = undefined but if i change this line on the script
data:'produtname_id='+val1+'&com_id='+val2,
I get produtname_id = "i get value" and com_id = undefined
Thanks for the help
data:{com_id: val1, produtname_id:val2},