Jquery Calculations As Per Selected Dropdown Value Loop
Iam trying to do a calculation. When a user selects a dropdown currency. The system calculates and converts the selected currency from the dropdown to INR currency values. The reco
Solution 1:
your function is almost right, you have only one "extra" dot after "total1"
you can safely change
var newTotal = currency==="INR" ? totalINR : (totalINR * conversionRate / row.find('.inrvalue').val()).toFixed(3);
for
var newTotal = 0;
if (currency==="INR")
{
newTotal = totalINR;
} elseif (currency==="USD")
{
newTotal = (row.find('.total1').val() * row.find('.inrvalue').val());
} else {
newTotal = ((row.find('.inrvalue').val() / conversionRate) * row.find('.total1').val());
}
hope this helps
Post a Comment for "Jquery Calculations As Per Selected Dropdown Value Loop"