I have a JavaScript program that does some rounding of numbers so that they don't get too long when presented in text fields.
However, it seems that Internet Explorer (conveniently) likes to ignore these things and continues to display the unrounded numbers (for example, it displays "8.019600000000000000001" instead of the "8.0196" that the JavaScript code should create).
Here's the snippit of code:
How come that doesn't work in Internet Explorer, but it seems to work fine in Mozilla? (Note: "tempK3" is a previous variable.)
However, it seems that Internet Explorer (conveniently) likes to ignore these things and continues to display the unrounded numbers (for example, it displays "8.019600000000000000001" instead of the "8.0196" that the JavaScript code should create).
Here's the snippit of code:
kval = (Math.round(tempK3*1000))/1000
document.show.kvalue.value = kval
How come that doesn't work in Internet Explorer, but it seems to work fine in Mozilla? (Note: "tempK3" is a previous variable.)