Click to See Complete Forum and Search --> : JavaScript File I/O


AcidBurnX
November 27th, 2004, 03:16 AM
Hi,

all I want to do is to write a JavaScript that can read lines from a simple text file and display them. I've done it like as follows:


fileObject = new ActiveXObject("Scripting.FileSystemObject");
fileText = fileObject.GetFile("./Test.txt");

// ....


This code works on my Windows system but it doesn't work on my Linux system -> the ActiveXObject cannot be created.

I want to write a JavaScript that is Platform independent and can read lines from a file. Is there any possibility to do that?
Any help would be great because i am a newbie in JavaScript ;-)

Thanks in advance
AcidBurnX