This is a migrated thread and some comments may be shown as answers.

Window - loading image whilst PDF loading

2 Answers 94 Views
Window
This is a migrated thread and some comments may be shown as answers.
JK
Top achievements
Rank 1
JK asked on 12 Jun 2009, 09:37 AM
Hi,

I have a fully working radwindow which obtains the PDF from a SQL database and "Writes" the results to the page (within the window).  As a result I need to have the "ShowContentDuringLoad" set to true (otherwise the page would not be displayed).

The problem is the PDF being downloaded (depending on broadband connection) makes it look like the web browser has stopped responding for some of our more impatient users.  Is there a way to put a comment or image to indicate its still loading whilst it is pulling the file from server?

Oh the ironry!  I need ShowContentDuringLoad both on and off ;o)

Here is the sequence of events within the web page:

1. click link
2. opens radwindow
3. radwindow pointing to another aspx page.
4. this page (ASP C#) writes results to page.

Thanks in advance.

2 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 15 Jun 2009, 12:46 PM
Hello JK,

I'm afraid this is not possible when you load the PDF directly in RadWindow. Yes, you could show a loading image, however the problem is that you will not "know" when to close it. The PDF does not fire any events so there is no such way that you could use to detect that the PDF is loaded and stop the loading animation.


All the best,
Georgi Tunev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Charles
Top achievements
Rank 1
answered on 24 Jul 2009, 12:55 PM
I've done something similar to this ages ago. The trick is to load the PDF in an IFRAME hosted in an aspx and listening for the onload event on the IFRAME:

<script>
    function PDF_OnLoad(){
        //hide DIV here
    }
</script>

<iframe src="mydynamicpagewhichloadspdf.aspx" onload="PDF_OnLoad();"></iframe>

With some css trickery you can place the loading div over the iframe whilst its loading.

Thanks
Tags
Window
Asked by
JK
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Charles
Top achievements
Rank 1
Share this question
or