I am using Autodesk Infraworks software and have to set some tips using both javascript and html.
I use a set of table where there is a field called USER_SUM_ALL. It stores different numbers like 10, 20, 20.3, 20.8 etc.
The problem is that that program shows number not like in original but with 15 digits after comma. This is a code:
<div><b><font size="5"> TEST: %USER_SUM_ALL% </font></b></div>
And it shows not 20.8 but 20.800000000000001
What can be done here to display numbers properly?
Upd.
<script>
function test(){
var x = %USER_SUM_ALL%;
document.write(x);
};
</script>
<div><b><font size="5"> Number is: <script> test() </script> </font></b></div>
Here my goal is to show the number in field USER_SUM_ALL
. Right now it doesn't react to field outside HTML tags.