[thelist] global.asa file syntax error

Christian Anderson chris at ingeniumgroup.com
Mon Oct 27 19:20:42 CST 2003


Hi,
 
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 funtions, 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!

Christian
www.photokyo.com



More information about the thelist mailing list