title: Javascript calculation returns NaN, when only first 2 sum inserted
body: <pre><code>function kanded_arvutus() 
    {
    var deebet1 = document.getElementById("deebet1").value;
    var kreedit1 = document.getElementById("kreedit1").value;
    var deebet2 = document.getElementById("deebet2").value;
    var kreedit2 = document.getElementById("kreedit2").value;
  
  
    var kokku_deebet = parseFloat(deebet1)+parseFloat(deebet2);
    document.getElementById("kokku_deebet").value = kokku_deebet.toFixed(2);   
    var kokku_kreedit = parseFloat(kreedit1)+parseFloat(kreedit2);
    document.getElementById("kokku_kreedit").value = kokku_kreedit.toFixed(2);     
    }
  </code></pre>
  
  <p>and this is html</p>
  
  <pre><code>&lt;input onClick="kanded_arvutus();" onChange="kanded_arvutus();" type="text" class="form-control" name="deebet'.$i.'" id="deebet'.$i.'"  placeholder="0" value=""&gt;             
  
  &lt;input value="" onClick="kanded_arvutus();" onChange="kanded_arvutus();" type="text" class="form-control" name="kreedit'.$i.'" id="kreedit'.$i.'"  placeholder="0"&gt;
  
  
  &lt;input type="text" class="form-control field" name="kokku_deebet" value="" id="kokku_deebet" placeholder="0"&gt;
  
  &lt;input type="text" class="form-control field" name="kokku_kreedit" value="" placeholder="0" id="kokku_kreedit"&gt;
  </code></pre>
  
  <p>and if i insert only kreedit1 and deebet1 values, then jquery returns NAN , but if i insert deebet2 and kreedit2 also, then working. </p>
  
  <p>someone maybe see, what wrong here ?</p>
  
  <p>Thanks in advance, aimar.</p>