Issue with ShowContentDuringLoad

5 posts, 1 answers
  1. Joe
    Joe avatar
    48 posts
    Member since:
    Dec 2007

    Posted 21 Oct 2010 Link to this post

    Hi,

    I've added ShowContentDuringLoad="false" to my otherwise functional RadWindow (see below). Now the loading dialog is displayed but never goes away. I can see in Fiddler that the request completed successfully with a 200 response. Do you have any idea why this is happening? The window loads correctly if the ShowContentDuringLoad attribute is either set to true or removed.

    Thanks,
    Joe

    --------------------------------
          <telerik:RadWindow ID="ViewRRDialog" runat="server" Title="View PDF Report"
            Height="550px" Width="800px" ReloadOnShow="true" Modal="true"
            Skin="WebBlue" VisibleStatusbar="false" ShowContentDuringLoad="false">
  2. Answer
    Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 22 Oct 2010 Link to this post

    Hi Joe,

    The title of the window leads me to believe that you are opening a PDF file in that RadWindow, am I right? If so, such behavior is expected - the PDF document is not a page and it doesn't fire window.onload that RadWindow expects before stopping the loading animation. If you are going to show PDF documents in the window, ShowContentDuringLoad should be set to true.

    Greetings,
    Georgi Tunev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Joe
    Joe avatar
    48 posts
    Member since:
    Dec 2007

    Posted 22 Oct 2010 Link to this post

    Hi Georgi,

    You are correct; I am displaying a PDF in the RadWindow using the Adobe plug-in.

    Thanks for the info. I will leave the value of ShowContentDuringLoad set to true.

    Regards,
    Joe
  5. JARROD R
    JARROD R avatar
    5 posts
    Member since:
    May 2007

    Posted 06 Jan 2014 Link to this post

    I know this is an old thread, but we encountered the same issue.  We are opening a PDF in the RADWindow control. 

    In firefox and chrome, the PDF opens without issue, right in the RAD Window, and the loading circle displays before it opens.  In IE though, the loading circle displays and never loads the PDF.  It just spins and spins.

    We changed ShowContentDuringLoad to TRUE and the PDF then opens in IE without issues (firefox and chrome also still work correctly).

    Was this always just an IE issue?

    Is there a way to show the loading circle when ShowContentDuringLoad is set to TRUE?
  6. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 07 Jan 2014 Link to this post

    Hi Jarrod,

    This is an IE problem - the iframe's onload event will not fire when a PDF is loaded in it. This is the event used to remove the loading sign. If it does not fire there is no way to know when the content has been received.
    You can easily confirm this by loading a simple pdf in an iframe under different browsers:
    <iframe src="http://www.adobe.com/products/pdfjobready/pdfs/pdftraag.pdf" onload="alert(1);"></iframe>


    What you can do is:
    - keep ShowContentDuringLoad to true for cases when you open PDFs. This will make sure they are always seen
    - try hiding the loading sign when the RadWindow shows only in IE, so that the rest of the browsers maintain the old behavior:
    <telerik:RadWindow ID="RadWindow1" runat="server" OnClientShow="showContentForIE">
    </telerik:RadWindow>
    <script type="text/javascript">
        function showContentForIE(wnd) {
            if ($telerik.isIE)
                wnd.view.onUrlChanged();
        }
    </script>

    I cannot guarantee this will work as expected, so you should test it first to see if it has the desired behavior.

    Regards,
    Marin Bratanov
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017