title: JavaScript document.getElementById().innerHTML = "" not working
body: <p>I'm looking to clear the content within a <code>&lt;div&gt;</code> but if I run the code it doesn't work. New to JS and would love a hand from someone who knows how it works!</p>
  
  <p>Code as is:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
      &lt;!-- Javascript --&gt;
      &lt;script type="text/javascript"&gt;
  
          //UpdatesPlayerRoster
          function refreshRoster(){
              document.getElementById('roster').innerHTML = "";
          }
      &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
      &lt;div id=bodyContainer class="bodyContainer"&gt;
      &lt;div id=playerListContainer class="playerListContainer"&gt;
          &lt;div id=playerListHeader class="playerListHeader"&gt;&lt;span class="playerListHeaderText"&gt;Players&lt;/span&gt;&lt;/div&gt;
          &lt;div id=playerListBody class="playerListBody"&gt;
          &lt;table&gt;
          &lt;div id=roster&gt;
              &lt;tr&gt;&lt;td&gt;CONTENT TO BE CLEARED&lt;/td&gt;&lt;/tr&gt;
          &lt;/div&gt;
          &lt;/table&gt;
      &lt;/div&gt;
  
      &lt;a href="#" onClick = "refreshRoster()"&gt;Refresh&lt;/a&gt;
      &lt;/div&gt;
  
  &lt;/body&gt;
  </code></pre>
  
  <p></p>