Trouble understanding different ways to make "radwindow"

2 posts, 0 answers
  1. Kevin M
    Kevin M avatar
    4 posts
    Member since:
    Sep 2009

    Posted 11 Sep 2009 Link to this post

    Hi all, thanks in advance for any help anybody may be able to offer.

    Let me start by saying that I'm a new ASP.NET developer and have a limited understanding of the language itself.  Sorry in advance for the simplicity of this question!

    I am working on a project that requires me to make a radWindow which basically allows users of a website to fill out a form for tax exempt purchases.  Actually that functionality is already in place, there is a "click here to submit form"  button on a page, and when clicked a rad window opens.  To get this functional something like this is used:
    <rad:RadWindowManager ID="radWinMgr" Behaviors="Reload, Resize, Close, Move" runat="server" Title="" ReloadOnShow="true" ShowContentDuringLoad ="true"  > 
        <Windows> 
            <rad:RadWindow ID="radTaxForm" OpenerElementID="lnkTaxForm"  runat="server" NavigateUrl="/cart/taxexempt.aspx" Height="775" Width="650"
            </rad:RadWindow> 
        </Windows> 
        </rad:RadWindowManager> 

    I uderstand what this is doing well enough, however my task is to make this new page that loads take in a value from the "parent" window (aka the window that this code is called on, the window that houses the radWindow).

    Now, previously I've done this successfully but I opened a radWindow differently, by making javascript functions openRadWindow() that added an attribute to the window.  I'm not sure how to do that with the code above. 

    Again, my goal is to pass a value from the parent window to the new rad window when it opens.

    Thanks for any help!!!
  2. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 16 Sep 2009 Link to this post

    Hello Kevin M,

    What I can suggest in this case is to declare a  javascript function  in the main page which will return  the parameter you want to pass. After that, from the RadWindow you can reference the main page, call this function and extract the value.

    In brief, the idea is the following one:

    main page:

    function ReturnParameter()  
    {  
      //custom code, calculate value, etc.  
      return myParameter;  


    RadWindow's content page:

    function GetRadWindow()  
            {  
                var oWindow = null;  
                if (window.radWindow) oWindow = window.radWindow;  
                else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;  
                return oWindow;  
            }  
     
    function ExtractMyParameter()  
    {  
        var myParameter = GetRadWindow().BrowserWindow.ReturnParameter();  

    I hope that my suggestion is helpful, let me know how it goes.

    Kind regards,
    Svetlina
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top