Update textfield in parent window and close child window

  1. #1

    Update textfield in parent window and close child window


    I have two windows. From window1 I do "window2.show()". In window2 I update a textfield of window1 (his parent window) and then I want to close window2 but all sentences I had tested fails: window.close(), self.close(), #{window}.hide()...

    Could you help me please?

    Thanks a lot.

    window1 (parent window):
    private void LoadWindowExtSearchCustomers()
    this.windowExtSearchCustomers.Width = Unit.Pixel(800);
    this.windowExtSearchCustomers.Height = Unit.Pixel(300);
    this.windowExtSearchCustomers.Modal = false;
    this.windowExtSearchCustomers.Collapsible = true;
    this.windowExtSearchCustomers.Maximizable = true;
    this.windowExtSearchCustomers.AutoLoad.Url = "../Customers/ExtSearchCustomers.aspx";
    this.windowExtSearchCustomers.AutoLoad.Mode = LoadMode.IFrame;
    this.windowExtSearchCustomers.ShowOnLoad = false;
    protected void OntggCustomerNumberClick(object sender, AjaxEventArgs e)
    }window2 (child window):
    protected void OnGridCustomersRowSelected(object sender, AjaxEventArgs e)
    string customerCode = e.ExtraParams["CustomerCode"];
    if (!String.IsNullOrEmpty(customerCode))
    ScriptManagerSearchCustomers.AddScript(string.Format("parent.document.getElementById('tggCustomerNumber').value='{0}';#{window}.hide();", customerCode)); //when I do #{window}.hide(); nothing ocurrs
  2. #2

    RE: Update textfield in parent window and close child window

    I solve my problem.

    The solution:

    <ext:Window ID="windowExtSearchCustomers" runat="server" Title="<%$ Resources: windowExtSearchCustomers %>" Icon="UserMagnify" Resizable="false" /> 
    <ext:Button ID="btnHideExtSearchCustomers" Hidden="true" runat="server">
            <Click Handler="#{windowExtSearchCustomers}.hide()" />

Similar Threads

  1. Replies: 6
    Last Post: Feb 15, 2012, 4:15 PM
  2. Replies: 7
    Last Post: Feb 09, 2012, 11:17 AM
  3. Replies: 0
    Last Post: May 13, 2011, 7:40 AM
  4. Replies: 0
    Last Post: May 13, 2011, 7:20 AM
  5. [CLOSED] How to display child window outside Parent window
    By Hari_CSC in forum 1.x Premium Help
    Replies: 1
    Last Post: Jul 02, 2010, 11:06 AM

Posting Permissions