setInterval not running
Posted: 2021-06-26 09:27
Hi all,
I tried to follow the Appgini course on calculated field that can automatically sum the subtotal but the setInterval function is not running.
But when I refresh the page the value is updated.
This is my code
I am using Appgini version 5.97
Can anyone help me to find out what's wrong with this.
Thanks
I tried to follow the Appgini course on calculated field that can automatically sum the subtotal but the setInterval function is not running.
But when I refresh the page the value is updated.
This is my code
Code: Select all
if ($j('[name=SelectedID]').val().length) setInterval(update_order_total, 5000);
update_order_total();
function update_order_total() {
$j('#OrderTotal').load('hooks/ajax-order-total.php', { id: $j('[name=SelectedID]').val() });
}
Can anyone help me to find out what's wrong with this.
Thanks