HomeBlogJavascript toFloat()

Javascript toFloat()

Published May 7, 2004
This week while writing some code, we needed to change a field from a float (which display about 19 decimal points by default) to a number with was 2 decmial points. In PHP this isnt an issue but we thought that in Javascript it would be. If you are running Javascript 1.5 or above, then you can use the toFixed() function. Basically Number.toFixed(2) would display the number with 2 decimal places only. Found it handy and useful, but we did have some browser related issues. Hope you found this helpful and handy ttu l8r then .....
blog comments powered by Disqus

1 COMMENT

Connect With Us

Send Us a Message

Do you wish to give us feedback on one of our apps, send us a message or explore a proposal? Fill out the form below and we'll get back to you pronto!

Visit Us

250 West Nyack Road, Suite #200 West Nyack, NY 10994
Get Directions

Call Us Toll Free

877-GO-RUSTY
877-467-8789

Telephone

845-369-6869

Fax

845-228-8177