title: GetElementbyID fails to fire
body: <p>From my reading here I would expect this code to work, but it doesn't. I have tried two ways to add click events to a button called "lonext". Neither work. I'm not sure why this might be?</p>
  
  <pre><code>window.onload = function() {
  
  var goSC = function() { //go to the sucess criteria section
      document.getElementsByClassName("guidance1").style.display = "none";
      document.getElementsByClassName("guidance2").style.display = "";
      alert("button clicked");
  
  //first try
  document.getElementById("lonext").addEventListener("click", function() {
      goSC();     
      }, false);
  
  //second try
  document.getElementById("lonext").onclick = goSC;
  
  }
  </code></pre>