I have a PDF that starts at (which has been worked out manually)
$0.01 to $122.14 =1 UNIT
$122.15 to $244.28 =2 UNITS
$244.29 to $366.42 =3 UNITS
and so on this is based on a Unit whose value is $122.14.
I want to create a calculation txt field on a FORM where the user inputs a dollar amount and the result is displayed for the correct amount of units.
so if I divide the unit $122.14 into say the first row .05 cents I get a result of .0004093.
It has to be a whole number 1 UNIT if the user inputs .05.
So Txt1 (dollar amount) divide by Txt2 ($122.14) gives me a whole number in Txt3 and not .0004093.
Any idea how to do this???????
Thanks James
event.value = Math.ceil(event.value*1 / 122.14) ;
and that should give you the correct number of units.
Hope this can help.
Max Wyss.