Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Currency JavaScript

Posted on 2006-05-12
4
Medium Priority
?
643 Views
Last Modified: 2011-10-03
Hello,

I have one AJAX application. As you all know, AJAX will send ansynchronous request to the server so that it does not need to refresh the page. However, I have one problem. As I send the values back to my JSP page, I want the value in textbox to be formatted to currency so that 20.7773 becomes €20.78.

Well, I can find many function freely available to do that. However, after the value is converted and formatted, I change the value in textbox again and the value is sent back to the server. It reports that it is not valid number as it contains €

Can you all suggest me the best way to tackle this problem?

Thanks
David
0
Comment
Question by:suprapto45
  • 2
4 Comments
 
LVL 7

Assisted Solution

by:bubbledragon
bubbledragon earned 800 total points
ID: 16672608
remove the € on submit
or use a hidden field to pass the value without &euro, use this field value after submit.
0
 
LVL 13

Accepted Solution

by:
Webstorm earned 800 total points
ID: 16680762
Hi suprapto45,

I don't think it's a good idea to add the € in the textbox.
You may instead put &euro; in front of the textbox like:  &euro; <input ...

0
 
LVL 16

Author Comment

by:suprapto45
ID: 16682342
I will agree to Webstorm in this case. So both of you are providing valid answer.

Thanks
David
0
 
LVL 13

Expert Comment

by:Webstorm
ID: 16682540
:-)
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question