title: How to add data to file in javascript?
body: <p>I want to make registration form and write the data into data.txt using ActiveXObject.
  What I write is</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      function WriteFile()
      {
         var fso  = new ActiveXObject("Scripting.FileSystemObject");
         var fh = fso.CreateTextFile("E:\\Test.txt", true);
         x=document.getElementById("name").value;
         y=document.getElementById("password").value;
         fh.WriteLine(x+"#"+y);
         fh.Close();
      }
  &lt;/script&gt;
  &lt;BODY&gt;
  &lt;form&gt;
      &lt;input type="text" id="name"/&gt;
      &lt;input type="text" id="password"/&gt;
      &lt;input type="button" value="Sign Up" id="write" onclick="WriteFile()"/&gt;
  &lt;/form&gt;
  &lt;/BODY&gt;
  </code></pre>
  
  <p>When I tried that way, every time I click Sign Up button, the new data override the previous data. I tried to use <code>fh.AppendLine(x + "#" + y)</code> but it didn't work.</p>
  
  <p>Could anyone help me how to add data, not override data?</p>