title: how to loop over elements in form using getElementsByName?
body: <p>I would like to select certain elements in form by their name, so I suppose using getElementsByName(name). Then I would like to add a value to these elements. How do I do this loop? </p>
  
  <pre><code>boxesEL = document.getElementsByName(boxesName);
  
  for(var x=0;x&lt;=boxesEL.length;x++){
      boxesEL[x].value = "some value";
  }
  </code></pre>
  
  <p>I'm getting an error boxesEL[x] is undefined.</p>