title: Javascript Sum currency
body: <p>I want to sum up a simple currency
  Here are my codes</p>
  
  <pre><code>function calculateText2(){
  
  var op11=document.getElementById('home_mortgage');
  var op22=document.getElementById('credit_card');
  var op33=document.getElementById('car_loan');
  var op44=document.getElementById('personal_loan');
  var op55=document.getElementById('tax_debt');
  var op66=document.getElementById('other_investment');
  var op77=document.getElementById('other2');
  var op88=document.getElementById('other3');
  
  var result1=document.getElementById('total2');
  
  if(op11.value=="" || op11.value!=parseFloat(op11.value)) op11.value=0;
  
  if(op22.value=="" || op22.value!=parseFloat(op22.value)) op22.value=0;
  if(op33.value=="" || op33.value!=parseFloat(op33.value)) op33.value=0;
  if(op44.value=="" || op44.value!=parseFloat(op44.value)) op44.value=0;
  if(op55.value=="" || op55.value!=parseFloat(op55.value)) op55.value=0;
  if(op66.value=="" || op66.value!=parseFloat(op66.value)) op66.value=0;
  if(op77.value=="" || op77.value!=parseFloat(op77.value)) op77.value=0;
  if(op88.value=="" || op88.value!=parseFloat(op88.value)) op88.value=0;
  
  result1.value=0;
  
  result.value=parseInt(result.value);
  
  result.value=parseInt(result.value)+parseInt(op1.value)+parseInt(op2.value)+parseInt(op3.value)+parseInt(op4.value)+parseInt(op5.value)+parseInt(op6.value)+parseInt(op7.value)+parseInt(op8.value);}
  </code></pre>
  
  <p>The problem is, it sums up the numbers, but not decimals. 
  Thanks.</p>