Load Pdf files in Iframe

  • Thread starter Thread starter Alhambra Eidos Kiquenet
  • Start date Start date
A

Alhambra Eidos Kiquenet

Hi misters,

I have a aspx page that loads PDF files into a frame (I call an
ShowFile.aspx file that uses Response.BinaryWrite).

I want that the user can see div with the message loading and finished it
when the PDF file have been loaded.

I have onload function for iframe but doesn't work, because never is called.
Appears progress bar in IE 6.0 but not go up.

Any solution about it, please?

Thanks in advance, greetings
,

<iframe src=""

id="iframeContenedorFicheros"

width="100%"

frameborder="1"

scrolling="auto"

onload="ficheroCargado()"
</iframe>

Javascript loads file in a frame
fichero = 'VerFichero.aspx?NOMBRE_FICHERO=' + fichero;
document.getElementById('iframeContenedorFicheros').src=fichero;
 
Alhambra said:
Hi misters,

I have a aspx page that loads PDF files into a frame (I call an
ShowFile.aspx file that uses Response.BinaryWrite).

I want that the user can see div with the message loading and finished it
when the PDF file have been loaded.

I have onload function for iframe but doesn't work, because never is called.
Appears progress bar in IE 6.0 but not go up.

Any solution about it, please?

Thanks in advance, greetings
,

<iframe src=""

id="iframeContenedorFicheros"

width="100%"

frameborder="1"

scrolling="auto"

onload="ficheroCargado()"


Javascript loads file in a frame
fichero = 'VerFichero.aspx?NOMBRE_FICHERO=' + fichero;
document.getElementById('iframeContenedorFicheros').src=fichero;

The onload event of the iframe tag occurs when the iframe tag is loaded
in the page, not when content is loaded in the iframe.

If you want to find out what happens in the iframe, you need to run a
javascript using an interval in the page, checking the readyState of the
document in the iframe.

However, I'm not sure that you can actually check the status when you
are loading a PDF file in the iframe.

Also, how the PDF file is loaded depends on how the browser and the
Adobe Reader is set up on the client computer. The browser may open the
file in a separate instance of Adobe Reader instead of opening it inside
the iframe.
 
Back
Top