• Community
    • Adobe Experience Manager Sites & More
    • Adobe LiveCycle (Archived)
    • Discussions
    • Re: Formatting number: a percentage with only one ...
  • Re: Formatting number: a percentage with only one ...

Avatar

Level 2 Ben_Walsh
Level 2
‎17-02-2010 23:49 PST
  • Mark as New
  • Follow
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report

You can format number decimal places in JavaScript using .toFixed() e.g.

var testNumber = 3.0123;
this.rawValue = testNumber.toFixed(1);     // result is 3.0

Ben Walsh

http://www.avoka.com

Views

323

Replies

0
0 Likes

Total Likes

Translate
Translate
  • ελληνικά
  • Italiano
  • Nederlands
  • Polski
  • русский
  • Svenska
  • Čeština
  • Türkçe
  • 한국어
  • 中文 (简体)
  • Español
  • 日本語
  • Deutsch
  • Português
  • Français
  • English
Reply
Powered by Khoros