/    Sign up×
Community /Pin to ProfileBookmark

iframe print puzzle?

Hey All,
Wondering if anyone can explain why the three divs in the following [URL=”http://www.areainspect.com/pagination/frames.htm”]iframes-construct [/URL]FAIL to print properly (IE6 anyway). Sifting through thousands of lines of suspect code this has been driving me crazy for days now, and finally all boils down quite simply to this:
Assume THESE 3 BARE BONES files: [COLOR=”Sienna”][B]frames.htm[/B][/COLOR], [COLOR=”Red”][B]red.htm [/B][/COLOR]and [COLOR=”MediumTurquoise”][B]green_blue.htm[/B][/COLOR]

To help clarify I’ve published a [URL=”http://www.areainspect.com/pagination/frames.htm”]DEMONSTRATION HERE [/URL]and POSTED the 3 simple files used in the online demonstration as .txt attachments.
Thanks. Hope it makes sense.

[upl-file uuid=5c620ca6-df9d-46bd-aa8d-5fd099a9be4c size=985B]frames.htm.txt[/upl-file]

[upl-file uuid=b3fe1102-9274-4b20-b805-3431c154987a size=1kB]green_blue.htm.txt[/upl-file]

[upl-file uuid=21931e01-23b3-4d05-a85f-daa5ab703798 size=2kB]red.htm.txt[/upl-file]

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@ray326Jul 05.2008 — Firebug says:

parent.document.green_blue is undefined

showBlue()red.htm (line 5)

onclick()red.htm (line 1)

[Break on this error] parent.document.green_blue.blue.style.display = '';

red.htm (line 5)

So I'm going to move this to the Javascript forum.
Copy linkTweet thisAlerts:
@tjmcdauthorJul 05.2008 — Well Gee thanks ray326. That does help.

I don't know from firebug, NOR -- as my project is NOT for general public consumption -- do I have ANY interest in browser compatibility at this time outside of IE6 or IE7. I have error reporting on. It's pretty straight forward code and I can't otherwise replicate your error. But thanks again for moving this BASIC IFRAME PRINT question from the HTML forum where other NON FIREBUG using, compassionate and knowledgeable souls might come up with an answer, to the JavaScript forum here, where the central issue of IFRAME PRINTING is SURE to be widely ignored. Thank You!

Meanwhile, as long as we're here --Not a JS Question -- but does anyone have any experience as to why -- in IE6 -- any iframe taller than appx 996px will PRINT ONLY ONE PAGE WORTH of content and blank pages for the ballance of pages required by the height of the iframe?

Here is an even simpler two file demonstration employing a single Iframe at a height of height:1992px (generally two printed pages worth) AND a single div in the iframe's src file with content at a specified height of 1968px (allowing for MARGINS of error). -- Please Note the general absence of JavaScript to this point -- A quick look at the browsers's Print Preview will reveal that standard clicking of the browser's print button would result in a printing of 2 Pages but only the first with any content. Meanwhile, clicking the 'PRINT GREEN BLUE' (caution... JS employed here) will result in TWO printed pages complete WITH ALL content.
Copy linkTweet thisAlerts:
@420devilJul 17.2008 — Hello,

Any updates on this issue?

We are also facing somewhat same issue here. in our website there is an iFRAME whose height is more than 1500px. when we try to print this page, only the content from parent window are printing and iFRAME contents are invisible. Also some blank pages are printing along with this. How can we resolve this issue, any idea or suggestions?

Thank You.
×

Success!

Help @tjmcd spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...