you can use <script type="text/jscript" runat="server">, but to use <%, you have to set the page languge to jscript. that can be done in the ASP config, or by using the <%@ language="jscript" %> directive first thing in a single file.
Yes, I had already gone the route of <%@ language="jscript" %>, but with no success for at least some JS statements that worked under "<script> </script>".
Please see the post "document.write". Some JS statments do not kill the server, but I cannot tell whether they are even working because I cannot reply back to the current web page, and its not like I can put "breakpoints" in the code like good old C++.
Placing "<script> </script>" within the <% %> also seems to be a No-No.
A couple of example JS code lines, indicating acceptable JS within "<% %>" would be helpful.
var a = 0;
var b = 1;
x = b/a; // No error generated; thus, not being executed.
var z = F();
// All of these cause the server to return an error page.
//alert("z = " & z);
//response.write("z = " & z);
//document.write("<p style='color:#0000ff'>This text is styled with the style attribute!</p>");