[thelist] global.asa syntax error

Ken Schaefer ken at adOpenStatic.com
Tue Oct 28 04:19:58 CST 2003


a) Is this function contained within any of the other defined event handling
routines?

b) Can you post a few lines from before the line in question?

Cheers
Ken

Microsoft MVP - Windows Server (IIS)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Christian Anderson" <chris at jobdragon.com>
Subject: [thelist] global.asa syntax error


: I'm trying to get my global.asa file to execute a script upon a certain
: event, but I keep getting a syntax error. I've tested the script in a
: regular .asp file, and it works fine, so its kinda making me wonder if you
: cant have functions, or if there is a different syntax for the global.asa
: file?
:
: Here is where it chokes:
:
: --------------
: Function getAttachments()
:   Set Attachments = msg.Attachments
:    separator = ", "
:
:   For i = 0 To Attachments.Count - 1
:     If i = Attachments.Count - 1 Then
:       separator = ""
:     End If
:
:   Set at = Attachments(i)
:   at.SaveToFile( "c:\hshome\photokyo\blogzilla.jp\attachments\" &
addedthing
: & at.Name )
:   getAttachments = getAttachments & "<a href=""/attachments/" &_
:   at.Name &""">" & at.Name & "(" & at.Size & " bytes)" &_
:   "</a>" & separator
:   Next
: End Function
: --------------
:
: And the error that I get when I access the site is:
:
: --------------
: Microsoft VBScript compilation error '800a03ea'
:
: Syntax error
:
: //global.asa, line 62
: Function getAttachments()
: ^
: -------------- 
:
: Anyone know what I should do to make this work? Thanks!



More information about the thelist mailing list