Hi,
Espen wrote:[color=blue]
> I have this code..
>
> But I get this message: "The activeX-component can not established the
> object: scripting.filesystemobject?
> Do you know what is wrong?
>
>
> function writeToFile(){
> var TristateFalse = 0;
> var ForWriting = 2;
> var myActiveXObject = new ActiveXObject("Scripting.FileSystemObject");
> myActiveXObject.CreateTextFile("c:\\test.txt");
> var file = myActiveXObject.GetFile("c:\\test.txt");
> var text = file.OpenAsTextStream(ForWriting, TristateFalse);
> text.Write("Hello World");
> text.Close();
> }[/color]
Using ActiveX to write to files works only in IE, and only in a relaxed
security environment. Typically, this won't work in the Internet
security zone. This is probably your problem.
Change your security settings and try again.
Laurent
--
Laurent Bugnion, GalaSoft
Webdesign, Java, javascript
:
http://www.galasoft-LB.ch
Private/Malaysia:
http://mypage.bluewin.ch/lbugnion
Support children in Calcutta:
http://www.calcutta-espoir.ch