title: Uncaught TypeError: document.getElementById is not a function
body: <p>In my randomizing script I'm getting the error: Uncaught TypeError: document.getElementById is not a function. I looked at some other issues with this error on stack overflow and tried to fix it. I declared the variable before the function, and because a variable changes every time, I set it to another variable.
  I have no idea why this code is an issue, any help is appreciated.
  HTML:</p>
  
  <pre><code>&lt;div id="GetPlayers"&gt;
      &lt;input maxlength="1" id="input"&gt; &lt;button id="gp" onclick="gp()"&gt;Start!&lt;/button&gt;
      &lt;br/&gt;
      &lt;br/&gt;
      &lt;button id="DJ" onclick="DJ();"&gt;Display Your Job!&lt;/button&gt;
      &lt;br/&gt;
      &lt;span id="DS"&gt;1) Input Amount Of Players. 2)Click 'Display Your Job!'&lt;/span&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Javscript</p>
  
  <pre><code>var al;
  var rl;
  var bd;
  function gp(){
      players = document.getElementById("input").value;
      if(isNaN(players)){
          alert(players.toUpperCase() + "'s Players? Please Fix"); 
          return;
      }
      if(players === " "){
          alert("Please Define How Many People Are Playing!");
          return;
      }
      if(players === ""){
          alert("Please Define How Many People Are Playing!");
          return;
      }
      if(players &lt; 4){
          alert("Sorry, You Need Atleast 4 Players To Play!");
          return;
      }
      SA(players)
  }
  function SA(players){
      var positions = ["Murderer", "Judge", "Innocent", "Innocent"]; //Pre-set positions
      if(players == 5){
          positions.push("Co-Judge");
      }else if(players == 6){
          positions.push("Innocent", "Co-Judge"); 
      }else if(players == 7){
          positions.push("Murderer-2!", "Innocent", "Co-Judge");
      }
      Randomize(players, positions)
  }
  function shuffle(o){
      for(var j, x, i = o.length; i; j = Math.floor(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x);
      return o;
  }
  function Randomize(players, positions){
      rl = shuffle(positions);
      al = positions.length;
      confirm("You Have: " + al + " Players, Correct?");
      alert(al + ". " + rl);
  }
  var counter;
  var rl;
  var c;
  var p;
  function DJ(){
      counter = 0;
      var bd = 0;
      for(var c = 0; c &lt; al + 1; c++){
          if(counter == 0){
              p = c;
              document.getElementById("DS").innerHTML=(rl[p]);
              document.getElementById("DJ").innerHTML=("Click To Clear!");
              counter = 1;
              BlankDisplay()
          }
      }
  }
  function BlankDisplay(){
      if(counter == 1){
          document.getElementById=("Click The Button Above To See Your Job!");   
      }
  }
  </code></pre>