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

Trouble understanding different ways to make "radwindow"

1 Answer 32 Views
AJAX and Web 2.0
This is a migrated thread and some comments may be shown as answers.
Kevin M
Top achievements
Rank 1
Kevin M asked on 11 Sep 2009, 07:53 PM
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!!!

1 Answer, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 16 Sep 2009, 09:25 AM
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.
Tags
AJAX and Web 2.0
Asked by
Kevin M
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Share this question
or