Skip to main content
December 6, 2016
Question

Access Denied when changing the .src thru javascript

  • December 6, 2016
  • 1 reply
  • 688 views

I have thoroughly read many article on the access denied issue regarding disabling Protected Mode thru the preferences and thru the registry. Nothing seems to resolve our current issue.

We embed an Adobe Reader object on a webpage. We give the user the option to navigate to a local pdf and load the file. When I change the .src thru javascript I get an Access Denied error. Tried opening permissions on the local folder, tried running as a system administrator. Nothing seems to allow us to get by this issue.

Code snippet:

        var fileControl = document.getElementById("fUpLoadPDF");
      //alert(fileControl.value);
        ret = CheckIfPDFExtension(fileControl.value);

        if (ret)
        { 
        //alert(document.getElementById("AcroPDF1").src);
            alert(fileControl.value);
             document.getElementById("AcroPDF1").src = fileControl.value;

        }
else {
       alert('Error while checking the file extension');
}

Any help would be appreciated...

This topic has been closed for replies.

1 reply

Joel Geraci
Community Expert
Community Expert
December 6, 2016

Nothing about Reader Protected Mode would affect your browser-based JavaScript. The problem is elsewhere.

December 6, 2016

Any thoughts as to what? I agree but have run out of options to try.

IE 11, Windows 7

I specifically made a local folder and opened up the permissions wide open. The viewer opens up a document in the web directory as a default when the page loads just fine. Its just when you try to set the source to a local file. This has worked for years right up until IE 11 and Adobe DC>

Joel Geraci
Community Expert
Community Expert
December 6, 2016

I suspect it's more IE11 and not DC at all. You can verify this by trying to do the same kind of thing with an image file. If you see the same behavior, you know it's not PDF related.