#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Posts
    1
    Rep Power
    0
    Can I format a textbox to show US currency? remove decimal places? I have wa JS script that write the value to the box but it is just XXX.XX and I want $XXX.

    Thanks in Advance

    New to JS
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 1999
    Location
    Netherlands
    Posts
    77
    Rep Power
    15
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by jonath27:
    Can I format a textbox to show US currency? remove decimal places? I have wa JS script that write the value to the box but it is just XXX.XX and I want $XXX.

    Thanks in Advance

    New to JS
    [/quote]

    You can try it with: document.write(Math.floor(XXX.XX))

    This should return XXX. If you want XXX+1, you must use Math.ceil(XXX.XX).

    Regards, Peter

Similar Threads

  1. changing the buttons in the message box
    By crackerweb in forum Visual Basic Programming
    Replies: 6
    Last Post: October 23rd, 2003, 06:36 PM
  2. formatting text in a multi select box
    By Hakdogg in forum HTML Programming
    Replies: 3
    Last Post: October 15th, 2003, 10:42 AM
  3. Select Boxes to text box
    By chainsmoker in forum HTML Programming
    Replies: 10
    Last Post: October 14th, 2003, 11:02 AM
  4. Single and double quotes in form text input box?
    By CraigSmith in forum PHP Development
    Replies: 10
    Last Post: August 19th, 2003, 07:02 PM
  5. Replies: 0
    Last Post: February 24th, 2003, 12:00 AM

IMN logo majestic logo threadwatch logo seochat tools logo