title: Why am I getting "ReferenceError: getElementById is not defined"?
body: <p>I have a little JavaScript code I wrote, and for some reason I'm getting an error saying:</p>
  
  <pre><code>ReferenceError: getElementById is not defined
  </code></pre>
  
  <p>Here is the function:</p>
  
  <pre><code>window.onload=function() 
  { 
      clearAll(); 
      updatePizzaToppings(); 
      updatePizzaToppings(); 
      updatePizzaToppings(); 
      updatePizzaToppings(); 
  };
  
  
  function updatePizzaToppings() 
  { 
      var checkBox=getElementById('selectBacon'); 
      var pic=getElementById('BaconPic'); 
      if (checkBox.checked) 
      {
          pic.style.visibility='visible'; 
      }
      else 
      {
          pic.style.visibility='hidden';
      }           
  }; 
  </code></pre>
  
  <p>I've made a little JSFiddle for it as well. </p>
  
  <p><a href="http://jsfiddle.net/CkjkB/5/">http://jsfiddle.net/CkjkB/5/</a></p>