[thelist] External .js and ASP
Tab Alleman
Tab.Alleman at MetroGuide.com
Wed Feb 18 13:38:40 CST 2004
Anyone know anything about this weirdness?
I currently have an ASP page that is generating a JavaScript error when
a certain function is invoked. The error: "line: 1, char: 1, error:
Object Expected". Currently the ASP page gets to the JS thru a
Server.Execute that contains a <script src=""> tag.
When I take the contents of the .js file and put them in
<script></script> tags in the IncludeFile that gets .Executed, the JS
works fine.
So what is it about .Executed files that cause <script src=""> tags not
to work?
Here's a stripped down version of how the ASP page calls the javascript:
Main ASP Page Code:
<%
Server.Execute("includes/IncludeFile.asp")
%>
Includes/IncludeFile.asp code:
<html>
<head>
<title>Page Title</title>
<script language="JavaScript" src="ScriptFile.js"></script>
</head>
TIA,
Tab
More information about the thelist
mailing list