I've been experimenting on this for hours now and nothing seems to work.
Background:
- I have a form that have auto calculate fields, which gets the values from text fields (working fine)
- I am editing the code in JavaScript OnLoad event
- I've been using the variable.on('keyup', functionname) method and it's working for text fields
Problem:
- I also have radio buttons (e.g. tax included or excluded)
- So upon toggling the radio buttons, it does not automatically calculate the fields
- The algorithm / value getting seems to be working because tax is computed whenever I change any of the textfields but it does not auto calculate when I change the radio button
Code Snippet:
casePrice.on('keyup', funcCase);
caseQuantity.on('keyup', funcCase);
productDisc1.on('keyup', funcCase);
productDisc2.on('keyup', funcCase);
productDisc3.on('keyup', funcCase);
boxQuantity.on('keyup', funcCase);
<-- this the radio button and it seems to be the problem, I've tried onclick, onchange.. nothing auto calculates upon changing the radio
Summary:
- Values are auto-calculated whenever I change the text fields
- Values are NOT auto-calculated whenever I change the radio button
--- Although calculations will still be correct calculated after I change a textfield after changing the radio button