title: selectedIndex is undefined javascript
body: <p>My select is giving me undefined for is index.</p>
  
  <p>My code:</p>
  
  <p>HTML</p>
  
  <pre><code>&lt;div name="daysToReorder" class="days_to_reorder" onchange="getReOrderTables(this)"&gt; Day to reorder &lt;br&gt;
                &lt;select name="daysToReorder"&gt;
                &lt;option value="A"&gt;A&lt;/option&gt;
                &lt;option value="B"&gt;B&lt;/option&gt;
                &lt;option value="C"&gt;C&lt;/option&gt;
                &lt;option value="D"&gt;D&lt;/option&gt;
                &lt;option value="E"&gt;E&lt;/option&gt;
                &lt;option value="F"&gt;F&lt;/option&gt;
                &lt;/select&gt;&lt;/div&gt;
  </code></pre>
  
  <p>JS</p>
  
  <pre><code>  function getReOrderTables(select)
      {
  
      alert(select.selectedIndex);
  
  
      }
  </code></pre>