View Full Version : Printing with a Dynamically Sized Iframe?

11-30-2006, 09:15 PM
I'm designing a site that uses a navigation bar and an iframe to hold the content. The iframe dynamically resizes when a page is loaded into it, to avoid the need for a vertical scrollbar, using this code: http://www.dynamicdrive.com/dynamicindex17/iframessi2.htm. The problem is, when File > Print is selected, if the main page (containing the navigation bar) has focus, it will print the nav bar alone without the content of the iframe. I'm aware that I can print the contents of the iframe by giving it focus() and then using print() or some other method, but I'm afraid this still may be confusing to my users. Does anyone know how I can force the contents of this dynamic iframe to be printed when the main page has focus?