Hello,

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)


{


this.windowExtSearchCustomers.Show();


}window2 (child window):




protected void OnGridCustomersRowSelected(object sender, AjaxEventArgs e)


{


string customerCode = e.ExtraParams["CustomerCode"];


if (!String.IsNullOrEmpty(customerCode))


{


ScriptManagerSearchCustomers.AddScript("updateParentCustomerCodeField();");


ScriptManagerSearchCustomers.AddScript(string.Format("parent.document.getElementById('tggCustomerNumber').value='{0}';#{window}.hide();", customerCode)); //when I do #{window}.hide(); nothing ocurrs





}


}