0

Hello you wonderful people you.

I am getting most upset with a pathetically unimportant bit of code.

I have an iFrame. This iFrame loads a php script, the php script is not however html, it is a pdf document generated on the fly with FPDF.

I have a second iFrame, this has a spinny gif 'loading' thingy.

both iFrames have the same dimensions, one is set to display: block; whilst the other is set to display: none;

I can make the browser load the pdf document in the iFrame whilst display is none, and the loading screen is hapily spinning around, unfortunately, I have had absolutely no luck in triggering the display to switch to block on the pdf and none on the loading screen once the pd has loaded completely.

document.window.getElementById('myPdfFrame').complete doesnt help me
document.window.getElementById('myPdfFrame').window.status is undefined

the iFrame onload is only triggered the first time the parent page is loaded.

im stuck!

any ideas?
Thanks,
Ben

2
Contributors
1
Reply
5
Views
6 Years
Discussion Span
Last Post by LastMitch
0

I can make the browser load the pdf document in the iFrame whilst display is none, and the loading screen is hapily spinning around, unfortunately, I have had absolutely no luck in triggering the display to switch to block on the pdf and none on the loading screen once the pd has loaded completely.

I'm not why you used:

document.window.getElementById('myPdfFrame')
document.window.getElementById('myPdfFrame')

You just want to load the flippin.pdf?

I think it's myPdfFrame issue it's not reading it correctly.

Then you might include this plugin:

http://mozilla.github.io/pdf.js/

This is the demo:

http://mozilla.github.io/pdf.js/web/viewer.html

Edited by LastMitch: grammer

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.