Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

javascript calculate problem

user468Jun 10 2007 — edited Jun 11 2007
hi all
i have 3 items on page :p60_percent_a1, :p60_percent_a2, :p60_percent_a3 type :text_field
width: 6 maxwidth:6
this items can containes number with digits like 94.97
i have a button which call javascript function and calculate if sum of
:p60_percent_a1 = 39.22, :p60_percent_a2 = 41.33, :p60_percent_a3 =19.45 equals 100
var sum_percent = 0.00 ;

for(i=1;i<2;i++)
{
achuz1 = "P60_PERCENT_A" + i;
az = ' ';
az = document.getElementById(achuz1);
sum_percent += 1.00*az.value;
} (part of the function not all)
the problem is that sum_percent not equals 100 but equals 100.000000000000001
i want to know if the problem is in the items of the page that not define as 999.99
(i try to do this on format mask but it's not help) or the problem in the java function
please help
best regards
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 9 2007
Added on Jun 10 2007
5 comments
743 views