• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to format number as money in javascript? e.g 1000 to 1,000

 
Ranch Hand
Posts: 72
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
how to format number as money in javascript? e.g 1000 to 1,000
eg. 100000000 then it will be format into 1,000,000,000 can you give me some ideas thank you
 
Ranch Hand
Posts: 172
Redhat Ruby C++
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would use http://numeraljs.com/
 
Sheriff
Posts: 7134
1360
IntelliJ IDE jQuery Eclipse IDE Postgres Database Tomcat Server Chrome Google App Engine
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Use JSTL functions as in <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>, and use its formatNumber tag:

<fmt:formatNumber type="number" value="${your_number_here}" />
 
chrstian ferma
Ranch Hand
Posts: 72
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thaks man , i also use the but i use that when i getting the values from database for editing this is what i did i just want to share

need a function document.ready so that every time the page loads the function is working then pass the id to of textbox in that function $('#textboxid').mask(the masking format here e.g 99/99/9999)

then in controller convert the value from string to double before inserting into database then it works, just need the jqeury maskingplug in on eclipse then it works thanks correct me if im mistaken. :)
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic