Open HTTPS page from another HTTPS page using Rad Window

2 posts, 0 answers
  1. sk
    sk avatar
    5 posts
    Member since:
    Jun 2007

    Posted 06 Feb 2015 Link to this post

    Hello Team,
    I am trying to open an HTTPS page from another HTTPS page using Rad Window, but will not work. My scenario is like the following, please help.

    Scenario
    Parent page is https://parentpage.aspx
    Child page is https://childpage.aspx

    I am trying to open the child page from the parent page using below script.

    var oWindow = window.radopen(‘https://childpage.aspx’,'windowname');
  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3595 posts

    Posted 06 Feb 2015 Link to this post

    Hi,

    Does this URL open in a simple iframe? I am asking this because this does not seem like a valid URL to me,it is missing the domain part.

    I am attaching here a screenshot that shows what happens when you use an invalid URL on a simple iframe and on a RadWindow and how the behavior is the same. Here is the code used for that:

    <telerik:RadWindowManager ID="RadWindowManager1" runat="server"></telerik:RadWindowManager>
    <script>
        function pageLoad() {
            radopen("http://default2.aspx", "someRw");
        }
    </script>
    <iframe src="http://default2.aspx" style="width: 850px; height: 300px;"></iframe>

    What I can suggest is building the URL dynamically by using the window.location object (https://developer.mozilla.org/en-US/docs/Web/API/Window.location). Here is a basic example that will work for same-level folders. You can extend it with more complex logic or by static variables that know your application name:

    var desiredUrl = "https://" + window.location.host + window.location.pathname.substring(0, window.location.pathname.lastIndexOf("/")) + "/default2.aspx";
    radopen(desiredUrl, "someRw");


    Regards,

    Marin Bratanov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top