Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
9214 Widoki

In Version 7... Lets Consider I have 3 fields called "basic", "tac_perc" and "tac_amt"..

And the calculation goes like this: Basic: 1000 TAC %: 20 TAC Amount: 200

(i.e) 20 % on basic will be my TAC amount which is 200..

(Or) if u had entered 200 in tac_amount then 20 will be calculated as TAC %...

Now I have written 2 onchange functions: [Which is working good]

  1. onchange_percent: which calculates n give me TAC amount
  2. onchange_amount: which calculates n give me TAC %..

    <field name="tac_perc" on_change="onchange_percent(basic, tac_perc)"/>

    <field name="tac_amt" on_change="onchange_amount(basic, tac_amt)"/>

So When I enter 10% in "tac_perc" field, It calls the onchange_percent, which will calculate and populates the value to "tac_amount", but then again since "tac_amount" field is also having onchange method [onchange_amount], it then executes n returns the value to "tac_perc".. and the process continues...

So my question is How to stop the dynamicall triggering the Onchange Event.. or is there anyway to know how through which the onchange event is called...

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
paź 23
2092
2
paź 23
2331
2
sie 23
4355
4
sie 23
20699
3
paź 22
11144