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

RadWindow and Pdf

1 Answer 75 Views
Window
This is a migrated thread and some comments may be shown as answers.
Emanuele
Top achievements
Rank 1
Emanuele asked on 04 May 2012, 11:11 AM
Hi,
I have a problem with radwindow. When I open pdf in radwindow and move this radwindow the element send other request and reload the pdf everytime, when I open normal html page not sent other request.


Can I move without everytime reloading?

Thank you.


<head runat="server">
    <title></title>
    <script type="text/javascript">
        function LoadUrl() {
            //var windowURL = document.getElementById("url").value;
            var oWnd = radopen("http://www.kernel.org", null);
            oWnd.setSize(900, 400);
            oWnd.center();
        }
 
        function LoadPdf() {
            var oWnd = radopen("http://www.irs.gov/pub/irs-pdf/fw4.pdf", null);
            oWnd.setSize(900, 400);
            oWnd.center();
        }
 
        function LoadGoogle() {
            var oWnd = radopen("https://docs.google.com/gview?url=http://www.irs.gov/pub/irs-pdf/fw4.pdf", null);
            oWnd.setSize(900, 400);
            oWnd.center();
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
     
        <telerik:RadScriptManager runat="server"></telerik:RadScriptManager>
 
        <input type="button" id="url" value="Open Url" onclick="LoadUrl()" />
        <input type="button" id="Button1" value="Open Pdf" onclick="LoadPdf()" />
 
        <telerik:RadWindowManager ID="rwm" Modal="true" runat="server"></telerik:RadWindowManager>
 
    </div>
    </form>
</body>
</html>

1 Answer, 1 is accepted

Sort by
0
Accepted
Marin Bratanov
Telerik team
answered on 04 May 2012, 04:35 PM
Hi Emanuele,

This works fine with me, so it might be the pdf agent you are using. We have had similar reports about flash and silverlight objects placed in a RadWindow - they restart when the RadWindow is moved because their visibility is changed. It is possible that this is the case here as well. You can find attached a page that overrides some of the functionality of the RadWindow to avoid these visibility changes. You can give the approach a try and see if this helps. Please also note that this hacking of the functionality of the RadWindow is not recommended in all cases and it may be easier to disable the Move behavior of the RadWindow that loads a PDF in this case.


Kind regards,
Marin
the Telerik team
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 their blog feed now.
Tags
Window
Asked by
Emanuele
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or