colonel720
asked on
How do I print another frame in a frameset from javascript in IE7, as if I right-clicked on the frame and chose print?
I have a web application that is laid out in a frameset. Some users requested a button that enables them to print the contents of one specific frame, rather than the whole frameset. I tried in javascript parent.frames[4].print(); (4 is the index of my content frame in the frames collection) - however this printed the frame in which the button calling this javascript resides. In simpler terms: Frame 2 has <input type="button" value="print" onclick="parent.frames[4]. print();" />. Clicking that button prints frame 2, not frame 4 as i specified.
If I rightclick on frame 4 from the browser and click print, i get my content frame, frame 4. How can I replicate this functionality from javascript?
If I rightclick on frame 4 from the browser and click print, i get my content frame, frame 4. How can I replicate this functionality from javascript?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks