Load Pdf files in Iframe

  • Thread starter Alhambra Eidos Kiquenet
  • 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;
 
G

Göran Andersson

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top