[thelist] how to gen included client-side javascript from ASP?

Glenn Carr glenn at glenncarr.com
Wed Jan 7 16:43:38 CST 2004


I'm trying to use ASP server script to generate the 'source' for included JavaScript.  For example, in the test.htm (below) it includes 3 script tags, the first is a normal script, the second is inline script, the third is what I'm trying to make work.  I want to be able to generated the client-side script from server script.  This only displays output from the first two script tags, nothing is produced from the third.  What am I missing?

Thanks,
Glenn


test.htm
---
<html>
<body>
<script language="JavaScript" type="text/javascript" src="test_client_script.js"></script>
<script language="JavaScript" type="text/javascript">document.write( '<b>testing</b>' );</script>
<script language="JavaScript" type="text/javascript" src="test_client_script.asp"></script>
</body>
</html>

---


test_client_script.asp:
---
<%
Response.Write( "document.write( '<b>from generated script</b>' );" )
%>
---


test_client_script.js:
--- 
document.write( '<b>testing</b>' );
---



More information about the thelist mailing list