Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    New Coder
    Join Date
    Mar 2012
    Thanked 0 Times in 0 Posts

    How to close .pdf in html iframe ?

    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.

    So, is it possible to close the .pdf file with javascript first, then delete the local saved .pdf, then here we reload the html ?

    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.

    function reloadPage()
    function remove()
    var sBnr = document.getElementById("txtBnr").value;
            var myObject;
            var fso = myObject = new ActiveXObject("Scripting.FileSystemObject");
            fso.DeleteFile("C:\\eBondingDiagram\\" + sBnr + ".pdf");
    Last edited by Jian0203; 05-22-2012 at 08:52 AM.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts