[thelist] ASP to populate .js file?
Maximillian Schwanekamp
anaxamaxan at neptunewebworks.com
Tue Apr 6 23:41:51 CDT 2004
>Or alternatively, if I rename the file.js to file.asp, and then do some SQL
>queries from there, will it still function as a JavaScript file?
Assuming you're talking ASP 3.0 not .NET: Yes, you'll want to change the
ext to .asp. I use filename_js.asp as a convention. Use Response.AddHeader
before your output starts:
<%
Response.AddHeader "Content-type", "application/x-javascript"
%>
//followed by JS code, or ASP that outputs JS code.
Maximillian Von Schwanekamp
NeptuneWebworks.com
voice: 541-302-1438
fax: 208-730-6504
More information about the thelist
mailing list