Results 1 to 2 of 2

Thread: trying to add

  1. #1
    Join Date
    May 2004
    Posts
    530
    Rep Power
    0

    Default trying to add

    I have these variables i am trying to add in javascript
    discountedValue = theGrandTotalNumber + getdigits(theDiscount);

    however instead of adding, its concatenating. How do i get it to add?
    "...men are that they might have joy."
    Nephi

  2. #2
    Join Date
    May 2004
    Posts
    530
    Rep Power
    0

    Default

    Found that javascript is seeing these vars as string and not numbers . Therefore i have to parseInt to make them numbers.
    "...men are that they might have joy."
    Nephi

Posting Permissions

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