Loading ...
Sorry, an error occurred while loading the content.

Re: Remove $ from value

Expand Messages
  • Jon Stephens
    One way to do this is to use the String object s replace() method: var myValue = $295.95 ; alert( myValue.replace( $ , ) );
    Message 1 of 2 , May 3 7:51 AM
    • 0 Attachment
      One way to do this is to use the String object's replace() method:

      var myValue = "$295.95";

      alert( myValue.replace("$", "") );

      > Date: Tue, 4 May 2004 09:49:32 +1000
      > From: "Peter Dickson" <peter.dickson@...>
      > Subject: Remove $ from value
      >
      > I use an ordering system that spits out a '$' with the final total. I then pass along that
      > figure to the likes of paypal/paymate. Their ordering system doesnt like a '$' being thrown
      > at it.
      >
      > can someone please give me some sort of javascript to remove the "$" from a value when I
      > submit the form.
      >
      > many thanks
      >
      > Peter
    • Peter Dickson
      I use an ordering system that spits out a $ with the final total. I then pass along that figure to the likes of paypal/paymate. Their ordering system doesnt
      Message 2 of 2 , May 3 4:49 PM
      • 0 Attachment
        I use an ordering system that spits out a '$' with the final total. I then pass along that figure to the likes of paypal/paymate. Their ordering system doesnt like a '$' being thrown at it.

        can someone please give me some sort of javascript to remove the "$" from a value when I submit the form.

        many thanks

        Peter

        [Non-text portions of this message have been removed]
      Your message has been successfully submitted and would be delivered to recipients shortly.