Guys and gals,

I am trying to do a simple LITTLE DIVIDE problem using jQuery its getting the values, but when its returning the results, it as if they are being divided by 10000, but I know its not...

E.G. 50506/1000 = 50.506

in my jquery problem, it is coming up as

E.G. 50506/1000 = 0.050506

Here is my jquery


        var calculate = parseFloat($("#totalMiles").val()) / parseFloat($("#totalGallons").val());
        var totalMPG = $('#TotalMPG').val();
        sync(); <--this is another function i have above this...disreguard

can anyone see what my issue is?

6 Months
Discussion Span
Last Post by patk570

when i populated the number...i had a localization string .toLocaleString() and it was messing up the number. Once i removed the .toLocaleString() it fixed it and its now working beautifully. Sorry to bother ya...

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.