title: firefox does not get elements by name
body: <p>This piece of code does not seem to work with Firefox, however it works without any problem on Chrome and IE:</p>
  
  <pre><code>f = document.forms["form1"];
  var nombre = f.elements.item("nombre").value;
  var email = f.elements.item("email").value;
  var coment = f.elements.item("coment").value;
  </code></pre>
  
  <p>instead of assigning the corresponding value to the variables it just repeats the same value for all the variables so assuming the input <code>nombre</code> has the value <code>john</code>, <code>email</code> and <code>coment</code> will also have <code>john</code> even though in the input boxes of the form the values are different.</p>
  
  <p>So how to I check the values accordingly?</p>