title: Textarea return value is always null
body: <p>I am trying to get the users input from a textarea into my javascript </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function validateMessage() {
    var message = document.getElementById("message").value;
    window.alert(message);
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;label&gt;Message:&lt;/label&gt;
  &lt;textarea rows="5" cols="50" id="message"&gt;Foo&lt;/textarea&gt;&lt;button onclick="validateMessage()"&gt;Validate message&lt;/button&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Browsers console keeps giving me this message</p>
  
  <blockquote>
    <p>TypeError: document.getElementById(...) is null[Learn More] 
    contact.js:51:14</p>
  </blockquote>
  
  <p>Line 51 is the actual line in my JavaScript.
  I have read solutions where most people say to use the .value
  But as you can see it returns null.
  I cannot figure out why.</p>