Jun 09, 2009, 3:28 PM
multiple windows instances and referencing corrent one from Parent
Hi again,
I have an app that has the ability to create multiple instances of a window. Inside each new window, loaded in the iframe is another .aspx page containing some coolite form elements <Ext.Panel> <Ext:TextField>, etc.
I attached a snapshot of my scenario from the UI if it makes things clearer.
Any help would be greatly appreciated. Thanks.
I have an app that has the ability to create multiple instances of a window. Inside each new window, loaded in the iframe is another .aspx page containing some coolite form elements <Ext.Panel> <Ext:TextField>, etc.
function createWindow(RealTitle,TargetUrl)
{
toolwindow = new Ext.Window({
modal: false,
icon: 'LaptopEdit',
maximizable: true,
minimizable:true,
title: RealTitle,
constrain: true,
resizable: true,
header: true,
autoLoad:{maskMsg:"Loading...",
showMask:true,
mode:"iframe",
url:TargetUrl},
width:840,
height:675,
bodyStyle: 'background-color: #fff;'
});
toolwindow.show();
}
In the child page I have a keyUp javascript event setup on a Ext:TextField (Name field) that updates the Ext.Window title bar:
var updateWinTitle = function ()
{
parent.updateWinTitle("VitalTerm - " + "[" + <%=TextField5.ClientID %>.getValue() + "]");
};
This works fine for only one window instance. However, this doesn't work if more than one instance and any keyUp events from any child window updates only the most recent created window title. How can I get my child pages update their own windows titles? How can I reference the correct Ext.window id for the child containing window?I attached a snapshot of my scenario from the UI if it makes things clearer.
Any help would be greatly appreciated. Thanks.