I am dynamically generating an HTML file for the print option.
After the print window has been opened and the file printed, I want to remove the HTML file from the folder.
I need to do this with JavaScript. For this I am using the following code:
var myObject = new ActiveXObject("Scripting.FileSystemObject");
var myFolder = myObject.GetFile(strReportFilePath);
myFolder.Delete();`
But this only works in IE but not in Firefox, so how do I delete the file with a JavaScript function?