Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.

I'm embedding a PDF in a web page with the following html :-

<object id="pdf" classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" width="1024"  height="600">   <param name="SRC" value="/GetDoc.ashx?SOID=<%=Html.Encode(Model.OrderID)%>" />   <embed src="/GetDoc.ashx?SOID=<%=Html.Encode(Model.OrderID)%> " %>" width="1024" height="600">   <noembed> Your browser does not support embedded PDF files. </noembed>   </embed>  </object> 

The PDF's can be a little slow to load so I'd like to hide the object and display a loading message / gif until it's fully loaded so the user isn't looking at a blank screen.

All I really need is a way of telling when the object is fully loaded. I've tried the 'onload' event of the but iit never seems to get fired.

I'm beginning to think it might not be possible, but it never hurts to ask...

I'm embedding a PDF in a web page with the following html :-

<object id="pdf" classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" width="1024"  height="600">   <param name="SRC" value="/GetDoc.ashx?SOID=<%=Html.Encode(Model.OrderID)%>" />   <embed src="/GetDoc.ashx?SOID=<%=Html.Encode(Model.OrderID)%> "  width="1024" height="600">   <noembed> Your browser does not support embedded PDF files. </noembed>   </embed>  </object> 

The PDF's can be a little slow to load so I'd like to hide the object and display a loading message / gif until it's fully loaded so the user isn't looking at a blank screen.

All I really need is a way of telling when the object is fully loaded. I've tried the 'onload' event of the but i never seems to get fired.

I'm beginning to think it might not be possible, but it never hurts to ask...

I'm embedding a PDF in a web page with the following html :-

<object id="pdf" classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" width="1024" height="600"> <param name="SRC" value="/GetDoc.ashx?SOID=<%=Html.Encode(Model.OrderID)%>" /> <embed src="/GetDoc.ashx?SOID=<%=Html.Encode(Model.OrderID)%>" width="1024" height="600"> <noembed> Your browser does not support embedded PDF files. </noembed> </embed> </object> 

The PDF's can be a little slow to load so I'd like to hide the object and display a loading message / gif until it's fully loaded so the user isn't looking at a blank screen.

All I really need is a way of telling when the object is fully loaded. I've tried the 'onload' event of the but it never seems to get fired.

I'm beginning to think it might not be possible, but it never hurts to ask...

Source Link
phil_h
phil_h

HTML Embedded PDF's & onload

I'm embedding a PDF in a web page with the following html :-

<object id="pdf" classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" width="1024" height="600"> <param name="SRC" value="/GetDoc.ashx?SOID=<%=Html.Encode(Model.OrderID)%>" /> <embed src="/GetDoc.ashx?SOID=<%=Html.Encode(Model.OrderID)%> " width="1024" height="600"> <noembed> Your browser does not support embedded PDF files. </noembed> </embed> </object> 

The PDF's can be a little slow to load so I'd like to hide the object and display a loading message / gif until it's fully loaded so the user isn't looking at a blank screen.

All I really need is a way of telling when the object is fully loaded. I've tried the 'onload' event of the but i never seems to get fired.

I'm beginning to think it might not be possible, but it never hurts to ask...