Error on onchange Event
Posted: Thu May 27, 2021 5:52 pm
Hi,
I need to change the value of a select field dependent of the value of another select field.
I have the field "auf_ang_status". If this field is going to be changed to "cancelled" I want to change the value in the select field "auf_status" to "cancelled" as well.
Therefore I created an onchange Event on the Costum Code (field: auf_ang_status) with following content:
1st step is working: The value in field #2 will be also changed to "cancelled" but the alert box is not visible and I got following error in my console:
Any ideas what I am doing wrong here?
Thanks and br,
Oli
I need to change the value of a select field dependent of the value of another select field.
I have the field "auf_ang_status". If this field is going to be changed to "cancelled" I want to change the value in the select field "auf_status" to "cancelled" as well.
Therefore I created an onchange Event on the Costum Code (field: auf_ang_status) with following content:
Code: Select all
if($(this).val() == 'cancelled'){
$('#auf_status').val($(this).val()).change();
alert('Your Order will be cancelled!');
}
Code: Select all
jquery.js?ts=20210527154022:2 Uncaught RangeError: Maximum call stack size exceeded
at S.fn.init.val (jquery.js?ts=20210527154022:2)
at nuFormObject.calc (nuformclass.js?ts=20210527154022:591)
at nuTotal (nuform.js?ts=20210527154022:3915)
at eval (eval at <anonymous> (nuform.js?ts=20210527154022:3454), <anonymous>:1:9)
at HTMLInputElement.<anonymous> (nuform.js?ts=20210527154022:3454)
at Function.each (jquery.js?ts=20210527154022:2)
at S.fn.init.each (jquery.js?ts=20210527154022:2)
at nuCalculateForm (nuform.js?ts=20210527154022:3445)
at nuChange (nuform.js?ts=20210527154022:3352)
at HTMLSelectElement.onchange (index.php?i=0&opener=16221300228331002:1)
Thanks and br,
Oli