Results 1 to 2 of 2

Thread: Sub() to handle files

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2000
    Posts
    142
    I am trying to have a VBScript Sub() that will write a file upon the click of the Submit button on a form.

    Here is my code:

    <SCRIPT ID=clientEventHandlersVBS LANGUAGE=vbscript>
    <!--

    Sub B1_onclick

    Set filesys = CreateObject("Scripting.FileSystemObject")
    Set MyFile = filesys.CreateTextFile("c:\temp\tttt.asp",true)
    MyFile.Writeln("This is a test.")
    MyFile.Close

    End Sub

    -->
    </SCRIPT>

    However, upon clicking the submit button I get the following error:

    "Error: ActiveX component can't create object 'Scripting.FileSystemObject'"

    I am baffled. Can someone tell me what's going on here, and suggest a way to get this going?

    Thank you very much!

  2. #2
    Fanatic Member RealisticGraphics's Avatar
    Join Date
    Jul 1999
    Location
    Arkansas
    Posts
    655
    One of two things. either you don't have Script Hosting Installed or your security settings in IE are setup in a fashion as not to allow the creation of any ActiveX objects.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width