title: Setting textarea innerhtml with javascript results in undefined error (weebly site)
body: <p>I have a weebly site with the 'note to seller' option enabled. There's no way to edit this field, so I'm trying to add a custom message to the textarea with javascript and I'm running into a bit of trouble. The textarea has no id, only a name attribute.</p>
  
  <p>HTML code:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>document.getElementsByName("order_notes")[0].innerHTML="PUT YOUR PERSONALIZED MESSAGE HERE";
  var standard_message = document.getElementsByName("order_notes")[0].innerHTML;
  var x = document.getElementsByName("order_notes")[0];
  
  x.addEventListener("focus", myFocusFunction, true);
  x.addEventListener("blur", myBlurFunction, true);
  
  function myFocusFunction() {
      if (document.getElementsByName("order_notes")[0].innerHTML == standard_message)
          document.getElementsByName("order_notes")[0].innerHTML="";
  }
  
  function myBlurFunction() {
      if (document.getElementsByName("order_notes")[0].innerHTML == "")
          document.getElementsByName("order_notes")[0].innerHTML=standard_message;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="wsite-com-checkout-notes"&gt;
    &lt;form&gt;
      &lt;h2 class="wsite-panel-title"&gt;Note to Seller (Optional)&lt;/h2&gt;
      &lt;div class="wsite-form-field"&gt;
        &lt;div class="wsite-form-input-container"&gt;
          &lt;textarea class="wsite-form-input wsite-input" name="order_notes"&gt;&lt;/textarea&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/form&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>When viewing the checkout page (where the field is), I immediately see this error in the console: <strong>Uncaught TypeError: Cannot set property 'innerHTML' of undefined</strong>, but if I type in the code in the console again it works perfectly. The code is executed right before the closing 'body' tag, so the textarea is already created by the time the code kicks in. I also tried running the code with window.onload but I still get the same error.</p>
  
  <p>I tried using jQuery first but for some reason Weebly won't recognize the function, even though the library is loaded and there are other functions using jQuery already. </p>
  
  <p>Any ideas what could be causing this? All help is appreciated!</p>