title: Calling JavaScript from ASP
body: <p>I have a line of code: </p>
  
  <pre><code>Response.write("&lt;script language=""text/JavaScript""&gt;alert(""What up dog"");&lt;/script&gt;")
  </code></pre>
  
  <p>This doesn't work.  I see no alert box, yet I see the page source has written the code correctly:</p>
  
  <pre><code>&lt;script language="text/JavaScript"&gt;alert("What up dog");&lt;/script&gt;
  </code></pre>
  
  <p>What I'm actually trying to do is this: </p>
  
  <pre><code>Response.write("&lt;script language=""text/JavaScript""&gt;document.cookie = '" &amp; Cookie &amp; " = ; expires=Thu, 01 Jan 1970 00:00:01 GMT;';&lt;/script&gt;")
  </code></pre>
  
  <p>That is: Delete a cookie with the name stored in the ASP variable 'cookie'.  This doesn't work either, which is why I'm attempting to create the alert box just to test where I'm screwing up.</p>
  
  <p>I've tried deleting the cookie with pure ASP (Response.cookie(Cookie).expires = Now() - 1), but since I made the cookie with JavaScript, it's not HTTPOnly so I can't access it with ASP.  (I just learned this, so I'm not 100% on the why of it all, but there it is.)</p>
  
  <p>So, back to the first line of code, why am I not seeing a JavaScript alert box with that line of code?  I'm obviously missing something simple (it's always something simple).</p>