title: VBS in html wont work?
body: <p>I created this as a HTA file and now I want to change it to HTML page. I thought I can only remove <code>&lt;HTML APPLICATION....&gt;</code> and paste rest of stuff into a html file. But looks like it wont work that way....</p>
  
  <p>What this HTA does is that allows user to enter information and save it to a text file then call up another batch file to run rest of work. It works in HTA but I have issues with user permission to write info back to the text file on server. so I want to do it on the webpage.</p>
  
  <p>Can anyone tell me how can I make this page work? </p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;Files Sync &lt;/title&gt;
  &lt;/head&gt;
  
  &lt;script language="vbscript"&gt;
  
  Sub WriteTxt_OnClick()
      Dim fso, txt
  
      Set fso = CreateObject("Scripting.FileSystemObject")
      Set txt = fso.CreateTextFile("E:\Temp\000.txt")
  
      txt.WriteLine document.Submitted_Link_To_Mex.body.value
  
      MsgBox ("File Submitted")
  
  End Sub
  
  Sub SYNC_onClick
  
       Set WshShell = CreateObject("WScript.Shell")
       WshShell.Run "E:\Temp\hahaha.bat", 0
              ' 0 =&gt; hide
       MsgBox("Success")
  
  End Sub
  &lt;/script&gt;
  
  &lt;H2&gt;Copy And Paste The Folder Path To Here &lt;/H2&gt;
  &lt;body&gt;
  
  &lt;form name="Submitted_Link_To_Mex"&gt;
  &lt;textarea name="body" cols="150" rows="20"&gt;
  
  &lt;/textarea&gt;
  &lt;/form&gt;
  
  &lt;br&gt;
      &lt;input type="button" value="1. SUBMIT" name="WriteTxt"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;
      &lt;input type="Button" value="2. SYNC" name="SYNC"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;
      &lt;input type="Button" value="3. CLOSE" name="button2" onClick="close"&gt;
  &lt;/div&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>