Hi all,
I need to perform some calculations on a page and my users want to see the result immediately, so I cannot do it with PS/SQL. Let's assume that I just need to summarize two item values (PX_1 + PX_2) and set the result to the third one (PX_3). So the procedure could be something like create a JS dynamic action that affects the PX_3 item, JS code would be something like:
parseFloat($v('PX_1')) + parseFload($v('PX_2'))
So far so good, but unfortunately in my national settings we have space as a thousand separator and comma as a decimal character and I have to perform more complicated calculation with more than just two items. The question is if there is something more straightforward and user friendly than do it the hard way (e.g. take all the field values=>remove spaces=>replace "decimal commas" with decimal points=>perform calculations=>format the result according to our regional settings).
Maybe there is some jQuery or API function that can do the hard work for me and I'm just not aware of it. As there is quite a lot of "online calculations" in my app, any help will be highly appreciated.
Regards,
Pavel