Feb 10, 2014, 2:36 AM
[CLOSED] Window-->Tab Panel has several tabs, each loading same Child Page...... I want to call JS function in child from Window
Hi,
I have a bit of an issue.
I have a window, inside I have a tab panel. The tabpanel loads a child panels defined on page load, with different parameters to represent different content for each tab.
In the child page, I have a js function SaveModifiedRecords, which in turn calls an App.direct function that calls a method on the server in the Child Page.
How, from the button defined on the Very top window ( the one hosting the TabPanel) , can I call this for the correct tab (activeTab)?
I tried getting the body of the active Tab:
App.ContentPlaceHolder1_TabPanel1.getBody().SaveMo difiedRecords.call() <-- NO LOVE
I tried getting the tabpanel specifically:
App.ContentPlaceHolder1_SubTab213.getBody().SaveMo difiedRecords.call() <-- NO LOVE
How can I get to the body of a panel, who's content is loaded via a loader..so I can call a Javascript function in it?
The panels in the tab are defined as so:
I have a bit of an issue.
I have a window, inside I have a tab panel. The tabpanel loads a child panels defined on page load, with different parameters to represent different content for each tab.
In the child page, I have a js function SaveModifiedRecords, which in turn calls an App.direct function that calls a method on the server in the Child Page.
How, from the button defined on the Very top window ( the one hosting the TabPanel) , can I call this for the correct tab (activeTab)?
I tried getting the body of the active Tab:
App.ContentPlaceHolder1_TabPanel1.getBody().SaveMo difiedRecords.call() <-- NO LOVE
I tried getting the tabpanel specifically:
App.ContentPlaceHolder1_SubTab213.getBody().SaveMo difiedRecords.call() <-- NO LOVE
How can I get to the body of a panel, who's content is loaded via a loader..so I can call a Javascript function in it?
The panels in the tab are defined as so:
private Panel CreatePanel(DebtLeverageSubsidiary sub)
{
string loadingString = (!string.IsNullOrEmpty(sub.Title)) ? "Loading Maturity Schedule for " + sub.Title + "..." : "Loading Maturity Schedule..";
Ext.Net.Panel panel = new Ext.Net.Panel
{
Border = false,
Title = sub.Title,
ID = "SubTab" + sub.DebtLeverageSubsidiaryId.ToString(),
Height = 390,
BodyStyle = "background-color:transparent;",
Loader = new ComponentLoader
{
LoadMask =
{
Msg = loadingString,
ShowMask = true
},
AutoLoad = true,
Mode = LoadMode.Frame,
DisableCaching = true,
Url = "MaturityEditor.aspx",
Params =
{
new Ext.Net.Parameter( "bsId",bsId.ToString(),Ext.Net.ParameterMode.Raw ),
new Ext.Net.Parameter( "portId",portId.ToString(),Ext.Net.ParameterMode.Raw ),
new Ext.Net.Parameter( "subId",sub.DebtLeverageSubsidiaryId.ToString(),Ext.Net.ParameterMode.Raw ),
new Ext.Net.Parameter( "year",year.ToString(),Ext.Net.ParameterMode.Raw ),
new Ext.Net.Parameter( "quarter",quarter.ToString(),Ext.Net.ParameterMode.Raw )
}
}
};
return panel;
}
Last edited by Daniil; Feb 10, 2014 at 6:15 AM.
Reason: [CLOSED]