ASP 3.0, SCRIPT SRC include variable scoping
The "order of execution" in an ASP page is
1) non-default language RUNAT=SERVER blocks.
2) default language inline script (that is, code within in <%...%> blocks).
3) default language RUNAT=SERVER blocks.
Since the default language in you page appears to be JScript, the
<SCRIPT language="JScript" SRC="myjsinclude.asp" RUNAT="server">
hasn't been parsed/compiled when the <%...//jscript here...%> inline blocks are executed.
So you're caught in a sticky little "catch 22"...
Please do not email questions - post them to the newsgroup instead.
> I've had no luck figuring out what happens to the scope of variables
> declared in a script block included using the following HTML code:
> //the jscript code preceeding
> <SCRIPT language="JScript" SRC="myjsinclude.asp"
> //the jscript code following
> I have never been able to reference variables declared in the
> "external" script in the code that would follow. IS there some trick
> I'm missing here? Should the file included in this manner not have
> the ".asp" extension? This addition to ASP was touted as a way to
> remove the need for server parsed pages (i.e. server-side includes),
> but I've never been able to use it.
> Thanks in advance,