4 Replies Latest reply on Sep 17, 2009 10:40 AM by Scott C Clark

    math.round question

    Scott C Clark Level 1

      I'm looking to use math.round to round a number to a double decimal and then eliminate any trailing zero's.


      What I have in a button field running a javascript returns "undefined". Changing the result.value to original.value will pass the value to the second field but prior to converting it to two decimals. Using text fields without designating a specific format automatically removes trailing zeros.


      var original= this.getField("Text3")
      var result = Math.round(original*100)/100

      getField("Text5").value = result.value