title: Populate HTML Label with JavaScript Variable
body: <p>I have a simple HTML page where I am trying to populate a label with a JavaScript variable</p>
  
  <pre><code>&lt;html&gt;
  &lt;body onload="loading();"&gt;
        &lt;div&gt;
            &lt;h4&gt;Main Page&lt;/h4&gt;
            &lt;label id="cookie1" style="color: #0026ff"/&gt; 
  &lt;!--MORE CODE--&gt;
        &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>My Javascript function is shown below. It will not populate the label on the html page but if I change the label to a textfield it will work (but i want a label). I have also used 'innerhtml' which does populate the label but it ONLY shows this label.  I have more fields and buttons that are erased or hidden if i use 'innerhtml'. Is there something I am missing?</p>
  
  <pre><code>function loading() {
      var val1 = "Site:   " + getCookie("storeSite");
      document.getElementById("cookie1").value = val1;
  }
  </code></pre>