myudt
asked on
floating point precision in an HTML text field
At this URL
http://www.cadenzasoftware.com/sample/printing/form.htm
I need the price field to always show two decimal points precision. As it is now, two decimal points are shown only when the page loads, because I have initialized the price field to 150.00. Play with the fields and controls and you will see that the fractional part goes away. All of the floating point values that I use in the script have two decimal places, even 0.00. How do I maintain two decimal places in the price field?
http://www.cadenzasoftware.com/sample/printing/form.htm
I need the price field to always show two decimal points precision. As it is now, two decimal points are shown only when the page loads, because I have initialized the price field to 150.00. Play with the fields and controls and you will see that the fractional part goes away. All of the floating point values that I use in the script have two decimal places, even 0.00. How do I maintain two decimal places in the price field?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.