I have used this code for numeric addition. The only one problem is that it is not calculating expressions like (10 + 1.5 = 11 ). Why this code not calculating .5 value in total?
<script>
function calculate() {
var myBox1 = document.getElementById('ORD_PRICE_1').value;
var myBox2 = document.getElementById('ORD_PRICE_2').value;
var myBox3 = document.getElementById('ORD_PRICE_3').value;
var result = document.getElementById('TOTAL');
var myResult = parseInt(myBox1) + parseInt(myBox2) + parseInt(myBox3);
result.value = myResult;
}
</script>