Currency

The Currency component formats strings as currency. For example, the string "1234" can be formatted as "$12.34" or "$1234.00."

Properties

name

Type - STRING
DisplayName - Name
Description - (REQUIRED) Enter unique name of the control. Must exactly match the name of the corresponding JavaScript object on the page.
DefaultValue - currencyComponent1

centValue

Type - NUMBER
DisplayName - Cents
Descirption - Enter the number of cents that you wish to convert to dollars.

moneyValue

Type - NUMBER
DisplayName - Money To Format
Description - Enter the string that you wish to have converted into a money format

decimalSeparator

Type - STRING
DisplayName - Decimal Separator
Description - Enter the separator that you would like used for the decimal place when formatting a money string.

thousandSeparator

Type - STRING
DisplayName - Thousand Separator
Description - Enter the separator that you would like used for the thousand place when formatting a money string.


Methods

string CentsToDollars( void )

Function:CentsToDollars
Input:None
Return:String
Description:Converts an integer cents value into a string representing dollars and cents. For example, converts 125 cents to 1.25 dollars.


string FormatMoneyStr( void )

Function:FormatMoneyStr
Input:None
Return:String
Description:This function ensures all values of dollars and cents appear with two decimal places representing cents after the dollar amount, e.g. $12.00. This prevents oddly formatted values such as $12.5 by replacing it with $12.50. Note that this function does not add the '$' character.


void setCents( value )

Function:setCents
Input:String
Return:None
Description:This function is used with client-side JavaScript to detect the brand and version of the user's browser. Detects only Netscape and Microsoft browsers.


void setMoneyToFormat( str )

Function:setMoneyToFormat
Input:String
Return:None
Description:This function is used with client-side JavaScript to detect the brand and version of the user's browser. Detects only Netscape and Microsoft browsers.


Events

None

Other Information

Environment: Client