Is there a way to do it? Im using onchage on fisrt select to call a function on javascript to do it but it does not change the selected value on the second select.
code:
function BuscaFormaPagto(str) {
if (str == “”) {
return;
} else {
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById(“txtHint”).innerHTML = this.responseText;
const $select = document.querySelector((“forma_recebimento”);
$select.value = this.responseText;
}
};
xmlhttp.open(“GET”,“getformarecebimento.php?q=”+str,true);
xmlhttp.send();
}
}