Hi
My custom number formatting function does not work. It was working fine when the site had a standard client server architecture. However, when we changed to using REST API with javascript and HTML5 the function works for most parts except cases when I need it to display 0's for decimals.
Basically, the function takes arguments a number and number of decimals and, returns the number rounded to the number of decimals passed. Below, I stripped the function to bare minimum, same as I was testing.
<cffunction name="dispCostPeriod" access="remote" returntype="string" output="false" hint="Displays costs for a given period to user">
<cfargument name="in_decCost" type="numeric" required="yes" />
<cfargument name="in_iRound" type="numeric" required="yes" />
<cfset decRoundedNum = NumberFormat(in_decCost, "_." & RepeatString("9",in_iRound))>
<cfreturn decRoundedNum />
</cffunction>