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.
–
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.