On Wed, 2009-03-04 at 13:50 -0800, Bob wrote:
> I'm relativley new to PrototypeJS. I
>  am doing some calculation in a back end program and returning a JSON
> string to my web page. One of the values is a price. If I return
> 14.20, it gets converted in evalJSON to 14.2. I want to keep both
> digits. I can find how to pad the left of a nmber to a certain number
> of places, but can't seem to find anythig about keeping decimals out
> to a set number of places.

Just a guess:

Convert to a string and then back to a number as needed?

-- 
Matt Zagrabelny - [email protected] - (218) 726 8844
University of Minnesota Duluth
Information Technology Systems & Services
PGP key 1024D/84E22DA2 2005-11-07
Fingerprint: 78F9 18B3 EF58 56F5 FC85  C5CA 53E7 887F 84E2 2DA2

He is not a fool who gives up what he cannot keep to gain what he cannot
lose.
-Jim Elliot

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to