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

Open HTTPS page from another HTTPS page using Rad Window

1 Answer 100 Views
Window
This is a migrated thread and some comments may be shown as answers.
sk
Top achievements
Rank 1
sk asked on 06 Feb 2015, 08:02 AM
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');

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 06 Feb 2015, 04:41 PM

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.

 
Tags
Window
Asked by
sk
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or