title: Javascript - innerHTML not working with HTML select menus
body: <p>In my HTML page I have 2 select menus with IDs "month" and "day" - "day" is empty when the page loads, "month" has 12 options with values 1-12 corresponding to January - December.</p>
  
  <p>"month" has an onchange event which calls this function:</p>
  
  <pre><code>function showOutboundDays(month)
  {
  if(month==4 || month==6 || month==9 || month==11)
      document.getElementById('day').innerHTML='&lt;option value="1"&gt;1&lt;/option&gt;&lt;option value="2"&gt;2&lt;/option&gt;'; etc. up to 30
  else if(month==2)
      document.getElementById('day').innerHTML='&lt;option value="1"&gt;1&lt;/option&gt;'; etc. up to 28
  else 
      document.getElementById('day').innerHTML='&lt;option value="1"&gt;1&lt;/option&gt;'; etc. up to 31
  }
  </code></pre>
  
  <p></p>
  
  <p>(just imagine there are braces around the option tags to help you see...)</p>
  
  <p>I think it's pretty clear to see what I'm trying to achieve...and everything works fine apart from the innerHTML of the select with ID "day" doesn't get filled at all, regardless of what month you pick. And I know the problem is with this stage of the function because when I change the if, elseif and else code-to-be-executed to alerts or something similar, it works fine.</p>
  
  <p>Does anybody know what the problem with the innerHTML is?</p>
  
  <p>Thanks</p>
  
  <p>EDIT: Using Firefox 3.6</p>