I am maintaining a legacy app that is trying to dynamically load some javascript during a postback event. The javascript has a line that tries to print the iFrame that contains the page that is loading the javascript. In other words, the window has a hierarchy of iFrames (a nightmare, I know). My code is in a asp.net page that is loaded within an iFrame with the id 'main'. So, the following code works without any problem from Firefox:
parent.frames['main'].print();
However, I can't seem to find the magical incantation that will get IE to print. I have tried adding this line before the previous line:
parent.frames['main'].focus();
But, that has no effect. Here is a simplified representation of the hierarchy:
<page>
<frameset>
<frame id='content'/>
<frameset>
<frame id='menu'/>
<frame id='main'/>
</frameset>
</frameset>
</page>
I have seen lots of stuff on the web about this but, haven't been able to get any of them to work across IE, FF.
I am using IE 10 and FF 28
Thanks for any advice you can give. I have wasted far too much time on this.