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

[Solved] Big Window outside a Small Window

8 Answers 150 Views
Window
This is a migrated thread and some comments may be shown as answers.
Erwin
Top achievements
Rank 1
Erwin asked on 12 May 2009, 09:38 AM
I have a parent page that opens a modal small window.  In the modal small window i have a search button where user can search.  I want to pop up another window for the search.  The problem is the search pop up window is inside the small modal window.  I want it out like in this demo:

http://demos.telerik.com/aspnet-ajax/window/examples/dialogreturnvalue/defaultcs.aspx

but i want the window to be modal.

also i would like to see how the second window "The Eruption" showed the other window.

8 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 12 May 2009, 10:30 AM
Hello Erwin,

I believe that the following KB article will be of help:
http://www.telerik.com/support/kb/aspnet-ajax/window/opening-a-radwindow-from-within-radwindow.aspx

The approach used in the demo that you've seen is basically the same - you can examine the code in the "Example & Source Code" section of the same page.


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
Erwin
Top achievements
Rank 1
answered on 13 May 2009, 06:37 AM
THANK YOU for the link....

My only problem now is how to will the third window return value to the second window.... like in the demo.

0
Georgi Tunev
Telerik team
answered on 13 May 2009, 08:32 AM
Hi again Erwin,

Check the returnValue() function in Dialog2.aspx - it shows how to do that.

function returnValue() 
    //get the RadComboBox's selected item's text 
    var combo = $find("<%= RadComboBox1.ClientID %>"); 
    var selectedCapital = combo.get_text(); 
 
    //Get a reference to the parent page (Default.aspx) 
    var oWnd = GetRadWindow(); 
 
    //get a reference to the second RadWindow 
    var dialog1 = oWnd.get_windowManager().getWindowByName("RadWindow1"); 
 
    // Get a reference to the first RadWindow's content 
    var contentWin = dialog1.get_contentFrame().contentWindow 
     
    //Call the predefined function in Dialog1 
    contentWin.populateCityName(selectedCapital); 
 
    //Close the second RadWindow 
    oWnd.close(); 


Best wishes,
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
Erwin
Top achievements
Rank 1
answered on 14 May 2009, 05:33 AM
Thanks for the reply but...
I can't seem to run this code since thier are functions and names that are not clear like the 

GetRadWindow(); 
RadWindow1

can you clarify these items

or can you show me how this function works...


0
Erwin
Top achievements
Rank 1
answered on 14 May 2009, 05:53 AM
can u show me a working sample that used that function like the demo
0
Erwin
Top achievements
Rank 1
answered on 14 May 2009, 07:27 AM
Sorry i miss look the code in the demo..

i figured out that the demo was using Radwindowmanager and the Zip file from the 

http://www.telerik.com/support/kb/aspnet-ajax/window/opening-a-radwindow-from-within-radwindow.aspx

was not.

It was the only thing missing......

but can I still run it if I will not use Radwindowmanager??

can i change this part??

   var dialog1 = oWnd.get_windowManager().getWindowByName("RadWindow1"); 
0
Georgi Tunev
Telerik team
answered on 14 May 2009, 01:49 PM
Hi Erwin,

If you are not using RadWindowManager, I assume that the second RadWindow is also declared on the parent page. In this case the easiest approach would be to:

  1. Create a function on the parent page that, when called, will return the needed RadWindow's object.
  2. Call this function from the content page in order to get the corresponding RadWindow.
e.g. in the parent page:
function findWin2() 
    var oWin = $find("<%= RadWindowExt.ClientID %>"); 
    return oWin; 

and in the content page:
function openChildWindow()  
    //get the parent browser's window 
    var browserWin = GetRadWindow().BrowserWindow; 
    //call the corresponding function to get a reference to the RadWindow 
    var oWnd = browserWin.findWin2(); 
    //show the window 
    oWnd.show(); 

I hope this helps.

Best wishes,
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
Erwin
Top achievements
Rank 1
answered on 18 May 2009, 07:33 AM
Thank you this works ^_^
Tags
Window
Asked by
Erwin
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Erwin
Top achievements
Rank 1
Share this question
or