...

View Full Version : problem with functions that adds input fields



mariya
04-16-2007, 04:14 PM
hi all,

I am having some trouble with a function that adds up 10 values and sees whether the sum is 100. It does not seem to add correctly, can you possibly help?


function doesAddUp(field1, field2, field3, field4,
field5, field6, field7, field8, field9, field10)
{

if (field1 + field2 + field3 + field4 + field5 + field6 + field7 + field8 + field9 + field10 != 100)
{ err = "Your total is not 100";}
else {err = false;}
return err;
}


Many many thanks!
mariya

javascriptbank
04-18-2007, 04:43 PM
I tested it. It's working correctly. :thumbsup:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum