NinjaTurtle
03-17-2005, 04:35 PM
i want to do a simple calculation: Quantity * Unitprice = Total, three textboxes.
But the UnitPrice will auto convert to currency format and display as "1,200.50" when user try to enter the value 1200.50. problem is the value with comma cannot do multiply... parseFloat is not working too.
document.form1.UnitPrice.value=ConvertCurrency(document.form1.UnitPrice.value)
document.form1.Total.value=document.form1.Quantity.value*document.form1.UnitPrice.value
But the UnitPrice will auto convert to currency format and display as "1,200.50" when user try to enter the value 1200.50. problem is the value with comma cannot do multiply... parseFloat is not working too.
document.form1.UnitPrice.value=ConvertCurrency(document.form1.UnitPrice.value)
document.form1.Total.value=document.form1.Quantity.value*document.form1.UnitPrice.value