How to delete a file from physical directory with JavaScript?
<p>I am dynamically generating an HTML file for the print option.</p>

<p>After the print window has been opened and the file printed, I want to remove the HTML file from the folder.</p>

<p>I need to do this with JavaScript. For this I am using the following code:</p>

<pre><code>var myObject = new ActiveXObject("Scripting.FileSystemObject");
var myFolder = myObject.GetFile(strReportFilePath);
myFolder.Delete();`
</code></pre>

<p>But this only works in IE but not in Firefox, so how do I delete the file with a JavaScript function?</p>
