title: document.getElementById("myId").InnerHTML can't find <div id="myId">
body: <p>I've having this problem with some JavaScript code.  I've simplified it in the error below because I've been able to pinpoint the problem by debugging.</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;select id="city_list_select" name="city"&gt;
      &lt;div id="clist"&gt;
          &lt;option&gt;Select a Region First&lt;/option&gt;
      &lt;/div&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>JavaScript:</p>
  
  <pre><code>document.getElementById("clist").innerHTML = "&lt;option&gt;Test&lt;/option&gt;";
  </code></pre>
  
  <p>I'm getting this error returned:  TypeError: Cannot set property 'innerHTML' of null.
  So it seems as if JavaScript can't find that div there.  I was able to work around the problem by removing the div and changing the JS to getElementById("city_list_select"), but I would still like to figure out why the div isn't working in case I come across a similar problem in the future.</p>