It's a redesign of an escrow screen that keeps live tallies and totals of 150+ fields on a single screen, I tried ajax but it was just to slow with all the data. So now I'm stuck trying to figure it out in JS.
The solution to the problem was to figure out how many digits are significant. I went out one decimal point past the last significant digit and add one to it. I can now round to any significant digit without worry of the dreded rounding error. It's an ugly hack but one that will work 100% for my usage.
5 comments so far
I would suggest pulling the calc out of JS and moving into C#. Expose back to the front end using an AJAX call.
2 years, 2 months ago by hkarthik
It's a redesign of an escrow screen that keeps live tallies and totals of 150+ fields on a single screen, I tried ajax but it was just to slow with all the data. So now I'm stuck trying to figure it out in JS.
2 years, 2 months ago by pauldy
150+ data entry fields on a single screen...the BA who gave you that mock-up needs a severe beat down.
2 years, 2 months ago by hkarthik
What is this BA you speak of? :-p
2 years, 2 months ago by pauldy
The solution to the problem was to figure out how many digits are significant. I went out one decimal point past the last significant digit and add one to it. I can now round to any significant digit without worry of the dreded rounding error. It's an ugly hack but one that will work 100% for my usage.
2 years, 2 months ago by pauldy