Results 1 to 3 of 3
  1. #1
    5 Star Lounger jujuraf's Avatar
    Join Date
    Jun 2001
    Location
    San Jose, California, USA
    Posts
    1,061
    Thanks
    0
    Thanked 0 Times in 0 Posts

    formatting output

    Hi all,
    I have a dinky web app that displays a pop-up window with a table. The data in the table is derived from various inputs the user provided and gets populated with onClick.() event. I'd like to format the $ amounts 'correctly' meaning "$nn,nnn.nn". Is there a built in format command with JS that I can use or do I write my own? Something like:

    newData = Format(provided_data, "$nn,nnn.nn")

    So that 12345.55 gets output as $12,345.55

    Thnx, Deb

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: formatting output

    Nothing pops out at me from the index in my JavaScript book. If your users are IE-only, I'd cheat and use VBScript. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

  3. #3
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: formatting output


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •