I have a simple webpage where 1 frame displays pdf and the other one is a menu bar.
<iframe src="bar.html" name="menu" ></iframe> <iframe src="doc.pdf" name="itempane" ></iframe>
Using chrome, I can go from the menu bar to the parent and go back to the frame containing the pdf to print it
var pWindow = window.parent; pWindow['itempane'].print();
Trying to do the same in IE11 gives an Invalid call object error.
you can see it at http://www.abhrdev.co.uk/main.html
What am I doing wrong / what makes IE different?
Greetings
Updated .....
I think I proved that this is not a javascript coding problem, but related to PDF processing in IE. On the next page
<a href="javascript:printFromMain('pdfpane');">Print PDF</a><br/> <a href="javascript:printFromMain('htmlpane');">Print HTML</a> <iframe src="bar_1.html" name="menu" ></iframe> <iframe src="doc.pdf" name="pdfpane" ></iframe> <iframe src="doc.html" name="htmlpane" ></iframe>
and this function
function printFromMain(paneName) { var pWindow = window[paneName]; pWindow.focus(); pWindow.print(); }
html page printing works, but not in pdf pWindow.focus () gives an invalid call object - any understanding of why this could be greatly appreciated
Billb source share