This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Editing currency fields in a web-app  RSS feed

 
Jon Baxter
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a text box where the client can enter a $ amount. Whats the industry standard for text entry in these fields, does one allow specifying
characters such as "$" and ",".

I mean is the industry standard to entry either a,b,c below in a text box for a $ amount.

a) 10000.45
b) 10,000.45
c) $10,000.45

For b,c the server side would have to have extra logic for removing $ and , for
 
Senthil B Kumar
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The user should be entering only the amount in numbers, the formatting can be handled by writting a common taglib for the money fields.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66144
143
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't believe there's any industry standard other than making things easy for the user. I would allow any of those, or any other deterministic, formats to be entered and have the server do the "extra work" rather than making the user do it.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!