Hi,
The following script reads only the first line of the text file..
How can I code it so that it is able to read all of the lines in the file..
Thanks.
VB Code:
<script> function ReadIt() { var filename = 'c:/27temp.txt'; if (confirm('Do you want to see what we wrote in your file?')) { var fso, a, ForReading; ForReading = 1; fso = new ActiveXObject('Scripting.FileSystemObject'); file = fso.OpenTextFile(filename, ForReading, false); var name = file.readline(); var password = file.readline(); file.Close(); document.write(name + '<br>'); document.write(password); alert(name +"...." + password) } } </SCRIPT>




Reply With Quote