View Full Version : Converting number to decimal in order to add percentages.

May 22nd, 2013, 05:25 AM
Lets say user enters the number 3 on a form. The 3 is to represent 3% increase of a number that will be uploaded from a .csv file field (ex..100). I need to be able to covert the 3 to .03 to mutiply by the number in .csv then add the sum to the .csv field. (ex: .03*100+100=103). Does anyone have an idea on how to accomplish this in javascript.

Help is much needed. Thanks

May 22nd, 2013, 06:46 AM
var markup = Field("Percent")/100);
var value = Field("Number");
return markup * value + value;