> -----Original Message----- > From: Ray Champagne [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 08, 2005 5:05 PM > To: CF-Community > Subject: Re: stupid Javascript question > > Yep, this worked: > > var price = 3 * 12.95; > document.write(price.toFixed(2)); > > Thanks, I was scouring the web trying to figure that out. I would have > been here a while. :)
You might want to test it out just to be safe tho' - I'm not sure what the browser cut-off point for JS 1.3 is... since the language is now up to 1.5 I think it's anything from the past few years, but I could be wrong. > That seems kinda convoluted if you ask me. I guess if I studied the > specifics, it would make more sense. Nothing like little problems like > this to stress you out under deadline and client pressure! Well - it IS convoluted - but it's the way that almost all computers do math. ;^) I believe (but am not sure) that the exact same thing happens in many languages, including Java and C++ (at least when you're multiplying floats)... I wonder what answer CFMX will give you... Jim Davis ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:5:160035 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/5 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:5 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.5 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
