I have a html where the user will just need to keyin the .pdf value and it will retrieve the file and it will be copied to local drive for certain reason. Once it's copied to local file, it will be display in IE. After the user has finished reading the .pdf, the user will click on one button to reload the html.
Now I want to add in a delete function to delete the local saved .pdf. When I try to call the function after my "window.location.reload()" , the delete function will definitely not running.
Thanks for suggestion.
Note : The .pdf will be display in the same window and same tab of IE. Whole html will be running in only one tab and window.
var sBnr = document.getElementById("txtBnr").value;
var fso = myObject = new ActiveXObject("Scripting.FileSystemObject");
fso.DeleteFile("C:\\eBondingDiagram\\" + sBnr + ".pdf");