reply thanks that worked I had to remember to add the quotes around my
response to make it a string. I'll also keep the calulation in mind if
I have any issues, so far all math is done in external programs and
sent back as a response.

On Mar 5, 8:15 pm, RobG <rg...@iinet.net.au> wrote:
> On Mar 5, 7:50 am, Bob <bro...@packagingcorp.com> 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.
>
> Others have answered your question (pass the value as a string),
> here's a bit more information on the topic if you are doing in-page
> calculations and wondering why they don't quite add up:
>
> How do I format a Number as a String with exactly 2decimalplaces?
> <URL:http://www.jibbering.com/faq/#formatNumber>
>
> --
> Rob
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to