Welcome to Redline spacer spacer
Convert a Numeric Field into a Dollar Value
bar Aug 6, 2020
bar Home
bar Downloads
bar Privacy
bar Site Map
bar Search

Home > Toys > Here
spacer Contained within this page is a JavaScript utility to convert a given numeric value into a "dollar amount". In short, this converts




This function is based on the math routines available through your browser. Hence it is limited to dealing with values in the +- (2**32)-1 (typically) on most of the "newer" browsers.

Furthermore, int2dollars() has to additional arguments for prefixing and suffixing negative values (such as a <font...> tag to turn the value red). Within this script there is a function "doit()" that exemplifies the calling conventions. For the purposes of example, if you enter a negative value into the "number" field, the "doit()" invocation of int2dollars() will prepend and append an "x" to the value that will be written into the "dollars" field.

Enter a number here
See the dollars appear here
Fight Spam! Join CAUCE!
In Assoication with Half.Com, an eBay company
In Association with Amazon.com

frame bar
spacer Creative Commons License
The website "Redline" by Roland J. Stolfa is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.
  [Home]    [Downloads]    [Downsizing]    [Writings]    [Crafts]    [Living]    [Family]    [Toys]    [Cryptography]    [Fun Links]    [Site Credits]    [Personal Info]    [Privacy]    [Site Map]    [Search]    [Email Me]