title: In Firefox, Write to a File using Javascript?
body: <p>Situation:-
  I have created a installation setup(local) that returns a URL eg:- ved.test.com which is mapped to an IP 11.22.33.44. 
  Thus to make the web application accessible after installation, user has to make an entry in the hosts file under "C:\WINNT\system32\drivers\etc" directory explicitly.</p>
  
  <p>Approach:-
  After the installation application gets completed, application writes the file using Javascript.</p>
  
  <p>Problem:-
  Writing a File using Javascript is supported in IE. I need a Solution for <strong>Firefox</strong>.
  Code used:-</p>
  
  <pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
  &lt;title&gt;Write To A File&lt;/title&gt;
  &lt;script language="javascript"&gt;
      function WriteToFile()
      {
      /* The below statement is supported in IE only */
      var fso = new ActiveXObject("Scripting.FileSystemObject");
      var s = fso.CreateTextFile("C:\\Test.txt", true);
      s.WriteLine('IE Supports Me!');
      s.Close();
      }
  &lt;/script&gt;
  &lt;/head&gt;
      &lt;body onLoad="WriteToFile()"&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Have also refered the link in SO:-
  <a href="https://stackoverflow.com/questions/585234/how-to-read-and-write-into-file-using-javascript">How to read and write into file using JavaScript</a></p>
  
  <p>Kindly provide a solution that supports writing a file using Javascript that runs in <strong>Firefox</strong> browser.</p>
  
  <p>Thanks in Advance.</p>