Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

iframe onload event

Status
Not open for further replies.

ToddWW

Programmer
Mar 25, 2001
1,073
0
0
US
I have an onload event in an iframe element and I'm preloading with about:blank. The onload event fires in both IE and Firefox when the parent document loads. When I use javascript to change the src of the iframe to a PDF document, the onload event fires in Firefox but not IE8. When I load the iframe with an HTML doc, the onload event fires in both browsers.

I have an application that I am loading PDF docs into an iframe. I need to know when the PDF doc is loaded. It works in Firefox, not IE8.

var v1 = document.getElementById("viewframe"); //This is the iframe element
v1.src = "something.pdf"

The loading works great, just not the onload event in IE8.

ToddWW
 
Have you considered embedding JavaScript inside the PDFs to report to the parent frame that they are loaded?

I don't know with 100% certainty that this will be possible, but I do know that you can put JavaScript inside PDFs to be executed by PDF readers that allow and understand such things.

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

Dan's Page [blue]@[/blue] Code Couch:
Code Couch Snippets & Info:
The Out Atheism Campaign
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top