title: button onclick Undefined is not a function
body: <p>I feel like this should be the easiest thing in the world. I just want to make a button with an onclick call and have it run javascript. Yet every time I do that I get the <strong>Uncaught TypeError: undefined is not a function</strong> error.</p>
  
  <p>I've read up on this but don't seem to understand why it can't find the function.</p>
  
  <p>To recap: Hitting the button should run ThePush() but I get an error on the console.</p>
  
  <p>Code:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;script type="text/javascript"&gt;
  
          function ThePush() {
            var name = document.getElementByID('name').value;
            var pl = document.getElementByID('PL1').value;
            var plw = document.getElementByID('theplw').value;
            var al = document.getElementByID('theal').value;
            //do stuff with these variables.
          }
  
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;b&gt;Player One: &lt;/b&gt;&lt;input id="name" type="text" value="Name"&gt;&lt;/input&gt;
  &lt;br/&gt;&lt;b&gt;Level: &lt;/b&gt;&lt;input id="PL1" style="width:50px" type="text" id="PL1L" value="0" readonly&gt;&lt;/input&gt;
  &lt;br/&gt;
  &lt;button id="thesub" onclick="ThePush();"&gt;Submit&lt;/button&gt;
  
  &lt;select id="theplw"&gt;
  &lt;option value="A: 0-999"&gt;A: 0-999&lt;/option&gt;
  &lt;option value="B: 1,000-9,999"&gt;B: 1,000-9,999&lt;/option&gt;
  &lt;option value="C: 10,000-99,999"&gt;C: 10,000-99,999&lt;/option&gt;
  &lt;option value="D: 100,000-499,999"&gt;D: 100,000-499,999&lt;/option&gt;
  &lt;option value="E: 500,000-1,499,999"&gt;E: 500,000-1,499,999&lt;/option&gt;
  &lt;option value="F: 1,500,000+"&gt;F: 1,500,000+&lt;/option&gt;&lt;/select&gt;
  &lt;br/&gt;&lt;b&gt;Sub Level: &lt;/b&gt;&lt;input id="theal" style="width:50px" type="text" id="AL1L" value="0" readonly&gt;&lt;/input&gt;
  &lt;hr&gt;
  &lt;iframe src="others.php" frameborder="0" width="500"&gt;&lt;/iframe&gt;
  &lt;iframe id="updater" src="update.php" frameborder="0" width="0" height="0"&gt;&lt;/iframe&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Any thoughts? Thank you in advance for your help!</p>