Results 1 to 4 of 4

Thread: Using Javascript to format an Integer w/o a Comma?

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jan 2004
    Location
    Southern California
    Posts
    5,034

    Using Javascript to format an Integer w/o a Comma?

    Using Javascript, how do you format an Integer so that it won't have any commas? I can't seem to find any examples of this.

    Thanks,
    Blake

  2. #2
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629

    Re: Using Javascript to format an Integer w/o a Comma?

    Format it how? There are no native JavaScript functions that add commas in the first place.
    Like Archer? Check out some Sterling Archer quotes.

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Jan 2004
    Location
    Southern California
    Posts
    5,034

    Re: Using Javascript to format an Integer w/o a Comma?

    Well, this application is using an Infragistics grid control that has EditorControl attributes assigned to the column in question. Unfortunately, there is nothing to suppress commas from showing up. So....I was wondering if it could be done using Javascript!
    Blake

  4. #4
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629

    Re: Using Javascript to format an Integer w/o a Comma?

    You can remove commas from a string using JavaScript.

    Code:
    var thousand = "1,000.00";
    
    thousand.replace(",", "");
    Like Archer? Check out some Sterling Archer quotes.

Posting Permissions

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



Click Here to Expand Forum to Full Width