title: getelementbyid innertext not working
body: <p>Hi trying to use getelementbyid and innerText but its not working in any browser. When I open up the error console, I'm getting the following error message </p>
  
  <blockquote>
    <p>TypeError: 'null' is not an object (evaluating 'document.getElementById("username").innerText = name')</p>
  </blockquote>
  
  <p>This is my code:</p>
  
  <pre><code>&lt;script&gt;
  alert("Using Javascript","");
  var name = prompt("Please enter your name?", "");
  var course = prompt("What course are you studying?", "");
  document.getElementById("username").innerText = name;
  document.getElementById("usercourse").innerText = course;
  &lt;/script&gt;
  </code></pre>
  
  <p>I don't know why I'm getting the null error.</p>