Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

I have a pdf inside an iframe and a description text beside it. In the text, I have links which should scroll the pdf to the desired page.

$('a.pdf-page').click(function(){
  var iframe = document.getElementById('#pdf-iframe');
  var page_no = $(this).attr( 'data-page' );
  iframe.contentWindow.location.hash = '#navpanes=0&toolbar=0&page=' + page_no;
  iframe.contentWindow.location.reload( true );

This works great in chrome, but firefox (v 23) gives me this error: "Permission denied to access property 'hash'".

Does anybody know why?

Thanks.

I'm having a similar issue. Trying to access almost anything off of the window object containing the PDF results in a permission denied. When I say "containing," in this context I mean that the source of the iframe points to an endpoint which streams PDF data back. This was not an issue previously using the Acrobat plugin. – DuxPrime Oct 19, 2013 at 19:42

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.