title: Updating Multiple Select Boxes dynamically
body: <p>I have a page that has 2-300 select dropdown boxes. I need to dynamically update each one to have the same list of options. Each time I try to update it it only does the first one. I suspect the problem is its not looping through it.</p>
  
  <p>// HTML</p>
  
  <pre><code>&lt;form id="myForm"&gt;
  &lt;select id="selectNumber"&gt;
  &lt;option&gt;Choose a number&lt;/option&gt;
  &lt;/select&gt;
  &lt;/form&gt;
  &lt;form id="myForm"&gt;
  &lt;select id="selectNumber"&gt;
  &lt;option&gt;Choose a number&lt;/option&gt;
  &lt;/select&gt;
  &lt;/form&gt;
  &lt;form id="myForm"&gt;
  &lt;select id="selectNumber"&gt;
  &lt;option&gt;Choose a number&lt;/option&gt;
  &lt;/select&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>// JavaScript</p>
  
  <pre><code>    var myArray = new Array("1", "2", "3", "4", "5");
  
  
      // Get dropdown element from DOM
      var dropdown = document.getElementById("selectNumber");
  
      // Loop through the array
      for (var i = 0; i &lt; myArray.length; ++i) {
          // Append the element to the end of Array list
          dropdown[dropdown.length] = new Option(myArray[i], myArray[i]);
        }
  </code></pre>
  
  <p><a href="http://jsfiddle.net/p6eqrxn8/1/" rel="nofollow">http://jsfiddle.net/p6eqrxn8/1/</a></p>