Big Window outside a Small Window

9 posts, 0 answers
  1. Erwin
    Erwin avatar
    74 posts
    Member since:
    Apr 2009

    Posted 12 May 2009 Link to this post

    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.

  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 12 May 2009 Link to this post

    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.
  3. Erwin
    Erwin avatar
    74 posts
    Member since:
    Apr 2009

    Posted 13 May 2009 Link to this post

    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.

  4. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 13 May 2009 Link to this post

    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.
  5. Erwin
    Erwin avatar
    74 posts
    Member since:
    Apr 2009

    Posted 14 May 2009 Link to this post

    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...


  6. Erwin
    Erwin avatar
    74 posts
    Member since:
    Apr 2009

    Posted 14 May 2009 Link to this post

    can u show me a working sample that used that function like the demo
  7. Erwin
    Erwin avatar
    74 posts
    Member since:
    Apr 2009

    Posted 14 May 2009 Link to this post

    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"); 
  8. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 14 May 2009 Link to this post

    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.
  9. Erwin
    Erwin avatar
    74 posts
    Member since:
    Apr 2009

    Posted 18 May 2009 Link to this post

    Thank you this works ^_^
Back to Top