title: Reading contents of a text file using JavaScript throwing error
body: <p>I'm using the following code to read the content of a text file using javascript. But when I'm getting an alert message which says "An ActiveX control on this page might be unsafe to interact with other parts of the page. Do you want to allow this interaction?" When I click on yes nothing is happening.</p>
  
  <p>I'm using IE 6.0</p>
  
  <pre><code>function ieReadFile(filename)  
  { 
      try 
      { 
          var fso  = new ActiveXObject("Scripting.FileSystemObject");  
          var fh = fso.OpenTextFile(filename,1);  
          var contents = fh.ReadAll();  
          fh.Close();
  
          alert(contents);
          //return contents; 
      } 
      catch (Exception) 
      { 
          return "Cannot open file :("; 
      } 
  } 
  </code></pre>
  
  <p>Can anyone please help me resolve this issue?</p>