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

RadWindow Close From Inside RadWindow

3 Answers 110 Views
Window
This is a migrated thread and some comments may be shown as answers.
itmanager@malibuboats.com
Top achievements
Rank 1
itmanager@malibuboats.com asked on 04 Jun 2009, 05:48 PM
I've looked all over the forums and even tryed googling for the solution with no luck.  I have 2 sites, one is the parent site that the user will be viewing and another host all the forms, we'll call it the child site, that hosts forms needed to submit info back (parent site is legacy and child are new).  The parent site has an older version of 2008.3.1314.35 of telerick ajax controls.  The child site has version 2009.01.0527.35.  I won't be able to update the parent site because it's a big site and when I tried to update it, I had over 100+ pages that errored out and with one developer it's going to take a while to resolve all the errors. 

Now my question is, is it possible for me to open a radwindow with the child site in it from the parent site and close the radwindow and refresh the parent site from a button on the child?

An off question but has to do with the parent site/ child site relationship.  How do I maximize the radwindow server side (this is using the radwindow from version 2008.3.1314.35) using follwing code?

RadWindow newwindow = new RadWindow();  
newwindow.ID = "RadWindow2";  
newwindow.NavigateUrl = url;  
newwindow.VisibleOnPageLoad = true;  
newwindow.ReloadOnShow = true;  
newwindow.OffsetElementID = button.ClientID;  
newwindow.Left = new Unit(100);  
newwindow.Top = new Unit(100);  
newwindow.Width = width;  
newwindow.Height = height;  
newwindow.Modal = true;  
newwindow.Behaviors = WindowBehaviors.Default;  
newwindow.KeepInScreenBounds = true;  
RadWindowManager1.Windows.Add(newwindow); 

3 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 05 Jun 2009, 10:14 AM
Hello Yer Yang,

Regarding your first question - unfortunately this is not possible. The browser security mechanism does not allow cross-site scripting - e.g. you cannot access objects on another page if it is not in the same domain. Note that this is not related to the RadWindow control, but is a general security issue.

As for your second question, you need to set the InitialBehaviors property:

newwindow.InitialBehaviors = Telerik.Web.UI.WindowBehaviors.Maximize;

Kind regards,
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
itmanager@malibuboats.com
Top achievements
Rank 1
answered on 05 Jun 2009, 03:08 PM
Is there any way to close the radwindow from the child site?
0
Fiko
Telerik team
answered on 08 Jun 2009, 03:49 PM
Hello Yer,

Like Georgi said in the previous thread, the browser security mechanism does not allow cross-site scripting and the child page cannot run script on the parent page(when the page are from different domains). This being said that the child page cannot close the parent page.
 
Sincerely yours,
Fiko
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.
Tags
Window
Asked by
itmanager@malibuboats.com
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
itmanager@malibuboats.com
Top achievements
Rank 1
Fiko
Telerik team
Share this question
or