On this function here:
<script>
function changeOptsQty(str,optid,opttotalprice) {
if (str == "") {
document.getElementById("TotalOptsPrice").innerHTML = "";
return;
} else {
xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("TotalOptsPrice").innerHTML = this.responseText;
}
};
xmlhttp.open("GET","changeOptsQty.php?q="+str + "&OptIDhid=" + optid + "&OptTotalPrice=" + opttotalprice ,true);
xmlhttp.send();
}
}
</script>
Where does the optid vaue parameter come from? I'm trying to do the next one opttotalprice but it doesn't work for me. So, if I understand where the optid comes from, maybe I can get it to work.
This is the line with the link:
echo "<td>" . "<input type='number' " . "min='1'". "class='formTextfield_Small' ". " . 'id='qtyopt' " . "name='qtyopt' " . "value='" . $WADAoptionalsrecords->getColumnVal('quantity') . "' " . "onBlur=changeOptsQty(this.value,".$WADAoptionalsrecords->getColumnVal('optional_id').")" . ">". "</td>";
Thanks.