I have developed the following script:
function calcBudget(){
a = CapBudget;
b = ExpBudget;
total = a + b;
return total;}
Example:
a = 47 b = 53
Answer should be 100, but I get 4753. How can I add these two together as numbers?
This is for a Intranet site at work. Calculation must be done on the client side.
function calcBudget(){
a = CapBudget;
b = ExpBudget;
total = a + b;
return total;}
Example:
a = 47 b = 53
Answer should be 100, but I get 4753. How can I add these two together as numbers?
This is for a Intranet site at work. Calculation must be done on the client side.
Comment