title: Javascript in HTML document is not executed
body: <p>This is a copy of an HTML document from a tutorial on Javascript. Upon opening it in Chrome, it doesn't behave as intended. When I click the button with <code>Set Cookie</code> written on it, nothing shows up, regardless of whether I have written something in the box (we should get output on the page) or not (we should get an alert). Why?</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;script type="text/javascript"&gt;
          &lt;!--
              function WriteCookie()
              {
                  if( document.myform.customer.value == ""){ 
                      alert("Enter a name");
                      return;
                  }
                  cookievalue = escape(document.myform.customer.value) + ";";
                  document.cookie="name=" + cookievalue;
                  document.write("Setting Cookies : " + document.cookie);
              }
          //--&gt;
      &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;form name="myform" action =""&gt;
          Enter name: &lt;input type="text" name="customer"/&gt;
          &lt;input type="button" value="Set Cookie" onlick="WriteCookie();"/&gt;
      &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>