-
I want to be able to open a plain text file in JAVASCRIPT and be able to read as text
I want to be able to open a plain text file in JAVASCRIPT and be able to read as text. .
I able to write text in .text file But i cant able to read or open file.here is javascript code...Please advice.
<script language="javascript" type="text/javascript">
var fso, ts;
var ForWriting= 2;
fso = new ActiveXObject("Scripting.FileSystemObject");
ts = fso.CreateTextFile("c:\\test.txt", 2, true,0);
ts.Close();
ts.write("ia javascript");
var ForReading = 1, openfile;
openfile = fso.OpenTextFile("c:\\test.txt", 1);
if(openfile =-1)
{
var obj = openfile.ReadAll();
//var obj = openfile.ReadLine();
Response.Write("File contents:" +obj);
}
</script>
-
-
Why is this in the mysql section? Is this not a JavaScript question? It should be posted there.
Daniel -
Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks