--
Sincerely,
Craig Buchanan, President
Cogniza, Inc.
www.cogniza.com
news.cogniza.com
+1.612.824.5858
<!--#include file="library.inc"-->
<script language="vbscript" runat="server">
sub session on_start
' ...blah blah
</script>
--
ab/mvp
"Craig Buchanan" <cra...@hotmail.com> wrote in message
news:#UHKQEvV$GA.254@cppssbbsa04...
Active Server Pages error 'ASP 0137'
Invalid Global Script
/oracle/node.inc, line 1
Script blocks must be one of the allowed Global.asa procedures. Script
directives within <% ... %> are not allowed within the global.asa file. The
allowed procedure names are Application_OnStart, Application_OnEnd,
Session_OnStart, or Session_OnEnd.
I have scripts included in the .inc files. Perhaps this is what is
objectionable.
Sincerely,
Craig Buchanan, President
Cogniza, Inc.
www.cogniza.com
news.cogniza.com
+1.612.824.5858
Aaron Bertrand <send_spam...@my-deja.com> wrote in message
news:OuAqtUvV$GA.262@cppssbbsa05...
On IIS4 using JavaScript, I'm successfully doing this by using a script
block inside the include file instead of <% %>. For example, the include
file utility.inc looks like:
<SCRIPT LANGUAGE=JavaScript RUNAT=Server>
function utilityFunction() {...
... several other functions ...
</SCRIPT>
Then, the global.asa looks like Mr. Bertrand has suggested:
<!--#INCLUDE FILE="include/utility.inc" -->
<SCRIPT LANGUAGE=JavaScript RUNAT=Server>
function Session_OnStart() {
utilityFunction();
...
</SCRIPT>
I haven't tried this with VBScript, but I would think that it would work the
same. I'm not sure that it would work if there was any script in the
include file that wasn't inside of a function or subroutine.
HTH,
Jesse
"Craig Buchanan" <cra...@hotmail.com> wrote in message
news:uA7uvevV$GA.261@cppssbbsa04...
--
ab/mvp
Thanks that worked. I had to remove all the "<%" and "%>" tags from my .inc
file and ensure that the <SCRIPT> tags were there as well.
Craig
Craig Buchanan, President
Cogniza, Inc.
www.cogniza.com
news.cogniza.com
+1.612.824.5858
Jesse E. Smith <jesse...@ieee.org> wrote in message
news:e5GOd1vV$GA.62@cppssbbsa04...
> My apologies in advance for posting JavaScript to a VBScript group.
>
> On IIS4 using JavaScript, I'm successfully doing this by using a script
> block inside the include file instead of <% %>. For example, the include
> file utility.inc looks like:
>
> <SCRIPT LANGUAGE=JavaScript RUNAT=Server>
> function utilityFunction() {...
> ... several other functions ...
> </SCRIPT>
>
> Then, the global.asa looks like Mr. Bertrand has suggested:
>
> <!--#INCLUDE FILE="include/utility.inc" -->
> <SCRIPT LANGUAGE=JavaScript RUNAT=Server>
> function Session_OnStart() {
> utilityFunction();
> ...
> </SCRIPT>
>
> I haven't tried this with VBScript, but I would think that it would work
the
> same. I'm not sure that it would work if there was any script in the
> include file that wasn't inside of a function or subroutine.
>
> HTH,
> Jesse
>
> "Craig Buchanan" <cra...@hotmail.com> wrote in message
> news:uA7uvevV$GA.261@cppssbbsa04...
> > Unfortunately, I get this error:
> >
> > Active Server Pages error 'ASP 0137'
> >
> > Invalid Global Script
> >
> > /oracle/node.inc, line 1
> >
> > Script blocks must be one of the allowed Global.asa procedures. Script
> > directives within <% ... %> are not allowed within the global.asa file.
> The
> > allowed procedure names are Application_OnStart, Application_OnEnd,
> > Session_OnStart, or Session_OnEnd.
> >
> > I have scripts included in the .inc files. Perhaps this is what is
> > objectionable.
> >