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

Update values on child window 1 from child window 2

1 Answer 58 Views
Window
This is a migrated thread and some comments may be shown as answers.
iomega 55
Top achievements
Rank 1
iomega 55 asked on 03 Dec 2009, 02:23 PM
Hi:

I have this scenario.

ePageBase00.aspx
This is the code for window manager
        <telerik:radwindowmanager ID="radWndManager" runat="server" DestroyOnClose="true" KeepInScreenBounds="true"  Behaviors="Close, Minimize, Move, Resize" />     
 

Also I have a spliiter in which sprestricted01 RadPane I load all *.aspx pages depending on the user's requeriments
<telerik:RadSplitter id="sp1" runat="server" Orientation="Horizontal" height="100%" width="100%" BorderSize="0" BorderWidth="0px" SplitBarsSize=""  
            VisibleDuringInit="false"
<telerik:RadPane ID="sp1Top01" runat="server" MaxHeight="30" Height="30" Scrolling="None" Width="100%" cssclass="div02"
</telerik:RadPane> 
<telerik:RadPane ID="sp1Restricted01" runat="server" Width="100%" Height="100%" ContentUrl="ePageBase01.aspx?a=0"
            </telerik:RadPane> 
</telerik:RadSplitter> 



Here I have all the javascript code for controlling radwindows
<script language="javascript" type="text/javascript"
function fnOpenWin(prWin, prTitle, prUrl, prModal, prIcon, prWidth, prHeight, prMaximized, prCentered, prBehaviors) 
    var oManager = GetRadWindowManager();            
    var wWinN = oManager.open( prUrl, prWin ); 
    wWinN.add_close(OnClientClose); 
 
function OnClientClose(oWnd, eventArgs)  
    oWnd.setUrl("about:blank"); // Sets url to blank 
    oWnd.remove_close(OnClientClose); //remove the close handler - it will be set again on the next opening      
</script>      


eTicket01.aspx
(who is loaded in the spRestricted01 RadPane of the eBasePage00.aspx)

I open a RadWindow, using the javascript functions declared in eBasePage00.aspx
<asp:linkbutton id="btnNewTicket" runat="server" OnClientClick="javascript:top.fnOpenWin('TicketPop','Tickets','../01/e01TicketPop.aspx?h=1&r=0',true,'materl16.gif',790,680,false,true,36);return false;"><img src="../../img/new.gif" alt="New Ticket" /></asp:linkbutton> 


Inside e01TicketPop.aspx
e01TicketPop.aspx is opened from e01Ticket01.aspx, I open a new RadWindow

<a href="#" onclick="javascript:top.fnOpenWin('WhoReportedIt','UserWhoReportedIt','../01/e01TicketsWhoReportedPop.aspx?h=1',true,'mat16.gif',500,380,false,true,36);return false;"><img src="../../img/viewpost.gif" alt="" /></a> 


So at this moment I have this:

ePageBase00.aspx (where radwindowmanager is declared, where all javascript functions exit. I have a rad splitter)
eTicket01.aspx (is loaded in the bottom pane of ePageBase00.aspx)
e01TicketPop.aspx (radwindow opened from eTicket01.aspx)
e01TicketWhoReportedPop.aspx (radwindow opened from e01TicketPop.aspx)

Here comes the question:

How can I pass 3 parameters from fields(textbox) in e01TicketWhoReportedPop.aspx to variables(labels) of e01TicketPop.aspx, at the moment I close e01TicketWhoReportedPop.aspx, considering I have javascript OnClientClose(oWnd, eventArgs) declared in ePageBase00.aspx?

I have already seen this link, but it assumes a differen scenario:
DialogsReturnValues


Any help is welcomed.





1 Answer, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 08 Dec 2009, 09:28 AM
Hi iomega 55,

 You can pass an argument by putting it as an argument in the close method as shown below:


http://demos.telerik.com/aspnet-ajax/window/examples/clientsideevents/defaultcs.aspx?product=window

Snce you want to pass 3 arguments, what I suggest is to incorporate them in one string by appending a special sign between the 3 arguments and then when you extract this string, you can split it by the special sign to get the 3 separate values. This is a standard approach when working with strings and you should not experience problems in implementing it since teh RadWindow provides teh ability to pass an argument.

Greetings,
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
Window
Asked by
iomega 55
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Share this question
or