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:
  1. <script>
  2. function ReadIt() {
  3.      var filename = 'c:/27temp.txt';
  4.      if (confirm('Do you want to see what we wrote in your file?')) {
  5.           var fso, a, ForReading;
  6.           ForReading = 1;
  7.           fso = new ActiveXObject('Scripting.FileSystemObject');
  8.           file = fso.OpenTextFile(filename, ForReading, false);
  9.           var name = file.readline();
  10.           var password = file.readline();
  11.           file.Close();
  12.           document.write(name + '<br>');
  13.  
  14.           document.write(password);
  15.       alert(name +"...." + password)
  16.      }
  17. }
  18. </SCRIPT>