title: Summing my HTML input text is not working
body: <p>I need to sum four input text values, but nothing is working. Here is the code I am trying:</p>
  
  <pre class="lang-js prettyprint-override"><code>&lt;script&gt;
      var uno    = document.getElementsByName('base')[0];
      var dos = document.getElementsByName('bonos')[0];
      var tres     = document.getElementsByName('salud')[0];
      var cuatro    = document.getElementsByName('afp')[0];
      var cinco   = document.getElementsByName('bruto')[0];
  
      function updateInput() {
          cinco.value = parseFloat(uno.value) + parseFloat(dos.value) + parseFloat(tres.value) + parseFloat(cuatro.value);
      }
  
      cinco.addEventListener('change', updateInput);
      cinco.addEventListener('keyup', updateInput);
  &lt;/script&gt;
  </code></pre>
  
  <p>The name of the input text are correct but the sum is not parsing. Any ideas?
  The input <code>CINCO</code> must sum the values from uno, dos, tres and cuatro but it shows only <code>0</code>.</p>