Results 1 to 1 of 1

Thread: ActiveXObject Identifier Expected

  1. #1
    Join Date
    Apr 2012

    Angry ActiveXObject Identifier Expected

    When running this script:

    01.<script type="text/javascript">
    02. // initialize ActiveXObject and create an object of Scripting.FileSystemObject.
    03. var fso = new ActiveXObject("Scripting.FileSystemObject");
    05. // returns the folder object associated with the specified folder
    06. var folderObj = fso.GetFolder("C:\\Temp");
    07. document.write(folderObj.Name);
    09. fso = null;

    I get an error saying "Row 3 Character 1 Identifier Expected".
    The script displays only '01.' (the apostrophes are not displayed)
    I thought maybe there was a security issue with ActiveX so I run another script wich uses ActiveX, and it both reads and writes local files, and also does a http.open using ActiveX working perfectly.
    I'm a beginner in Javascript, trying to make a script that lists all folders and files, starting with the specified folder.
    Environment is: Windows 7, Xampp(apache, mysql etc) IE9.
    So what's wrong ?

    Last edited by brad jones; 04-26-2012 at 03:30 PM. Reason: removed name

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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