Global.alert("base: " + base + ", upfront: " + upfront + ", both: " + (base + upfront));
This code above outputs this:
base: 15000, upfront: 36, both: 1500036
Why is it joining the two numbers instead of adding them up?
I eventually want to set the value of another field to this amount using this:
mainPanel.feesPanel.initialLoanAmount.setValue(Ext.util.Format.number((base + upfront), '$0,000.00'));
...and when I try that now it turns the number into the millions instead of 15,036.00. I have no idea why. Any ideas?