1 Reply Latest reply on Feb 2, 2007 1:34 PM by TroyK

    adding commas to dynamic numbers

      I have this calculator that takes a number from one text box, multiplies it by the value of a 2nd box and outputs into another text box the total value.

      When the total value appears, I used the Math.round function to round the final number to the nearest whole number.

      My question now is... how do I add commas if the total is greater than 999. Example : 1,000 100,000 1,000,000

      The code is pasted below. Any help would be greatly appreciated.


      AverageTotal = (Math.random(Breech))*(Math.random(Average));