TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Giovanbattista Barra
NA
98
18.5k
parseFloat problems in Internet Explorer
Feb 28 2019 5:59 AM
Hallo Team,
I have this piece of code from JQuery:
GetTripCosts: function () {
var km = $("#input_km").val();
var entire_Km = (km * 0.30).toFixed(2);
if (!isNaN(parseFloat(entire_Km))) {
$("#input_entire").val(entire_Km.replace(".", ","));
}
},
in Chrome: I put for example 55,88 in the input feld and I get result 55,88 * 0,30 = 16,76
in Internet Explorer the same calculation I get as result 16,50 rather then 16,76 like in Chrome.
If i put the number 55.88 with point comma rather then 55,88 then I get also in Internet Explorer the right result 16,76.
My question is: does it depend on the parseFloat?
Because I'm not sure that the problem regards the replace method.
I would appreciate some help and suggestions?
Thank you in advance.
Reply
Answers (
3
)
how to check if gridview is empty or not ?
Help getting the remote computer name