Hello All I am using Javascript to calculate some values of textboxes .The calculations become only for the value before decimal places but when i enter the value after a point then it make no nay effect on result.Here is my JS code and formulas in it
Update
var pkrusd;
pkrusd = parseFloat(document.getElementById('txtpkrusd').value, 10);
var ratelb;
ratelb = parseFloat(document.getElementById('txtRatelb').value, 10);
//Per 10 lb
var pertenlb=roundNumber(((pkrusd*ratelb)/400)*10,2);
parseFloat(document.getElementById('txtpertenlb').value)=addCommas(pertenlb);
//PEr 100 lb
var perhundlb=roundNumber(pertenlb*10,2);
parseFloat(document.getElementById('txtper100lb').value)=addCommas(perhundlb);
You should use
parseFloatinstead ofparseInt. TheintinparseIntis an abbreviation for “integer” which means “whole number”.