Page 1 of 1
Don't work calc object event
Posted: Tue Dec 26, 2023 7:14 pm
by Arunas
Hi
I have Cacl object and Custom Code Event onchange. Then change value, don't work Java script: nuMessage('Text');
Is there another way to execute a script to change the value of this object?
Arunas
Re: Don't work calc object event
Posted: Wed Dec 27, 2023 11:32 am
by kev1n
Hi,
Declare a function called nuCalculated() in your form's Custom Code:
Code: Select all
function nuCalculated(formula, value, formattedValue) {
nuMessage('Text');
}
Re: Don't work calc object event
Posted: Wed Dec 27, 2023 3:40 pm
by Arunas
This you code works.
But don't work, when replace nuMessage('Text') to my function sum_to_word($('#inv_grand_total').val()), which converts a number into text.
This functions works, when write into Input objects (Demo program fields ite_price and ite_units) Event onchange. Problem, when selecting a subform entry for deletion: the value of the Calc objects inv_grand_total changes, but function does not work in this object Event onchange.
So, in the future could Nubuilder Events maybe work with Calc objects too?