Percentage Calculation
hi, need creating calculation field find percentage of values obtained radio button groups in acrobat 9.0.
i have ten radio button groups (odio1, odio2, odio3, odio4, odio5, odio6, odio7. odio8, odio9, odi10).
each have 6 radio buttons/chocies correspond button values of 0,1,2,3,4, , 5.
i need calculation field display percentage of groups equation = (sum(odi01 - odi10)/50) * 100%.
this give me value 0-100%.
i have little experience in using javascript, in creating javascript use equation appreciated.
thank you!
if you're using percentage field result needs number between 0 , 1, not 100...
anyway, code replicates formula:
var total = 0;
for (var i=1; i<=10; i++)
total += +(this.getfield("odio")+i).value;
event.value = (total/50) * 100;
More discussions in JavaScript
adobe
Comments
Post a Comment