title: Cannot set cookies in Javascript
body: <p>I have a very simple line of code that set and read a cookie. I kept getting empty value for my cookie and have no understanding why. I have cookie enabled and know that cookies work on the browser.</p>
  
  <pre><code>&lt;HTML&gt;
      &lt;HEAD&gt;
          &lt;TITLE&gt;Hello World&lt;/TITLE&gt;
      &lt;/HEAD&gt;
      &lt;BODY&gt;
          &lt;SCRIPT type="text/javascript"&gt;
              document.cookie = "ding=dong";
          &lt;/SCRIPT&gt;
          &lt;script type="text/javascript"&gt;
              alert(document.cookie);
          &lt;/script&gt;
      &lt;/BODY&gt;
  &lt;/HTML&gt;
  </code></pre>