Jul 30, 2010, 8:37 PM
[CLOSED] Tab activate event
Hi,
I have created a bunch of tabs, each with their own iframe. The iframes are loaded when the "activate" direct event is fired. eg
However if i want to refresh the iframe within the tab, what client side method do i need to call? Alternatively, what directevent event should i be calling when i do a reload client side? Please note that if i use the "Update" directevent, the iframe keeps refreshing itself every couple of seconds.
Many Thanks
Lee
I have created a bunch of tabs, each with their own iframe. The iframes are loaded when the "activate" direct event is fired. eg
<a href="#" onclick="#{_tabPanel1}.setActiveTab(#{_tab3});#{_tab3}.reload();">load tab 3</a>
<br /><br /><br /><br />
<ext:TabPanel ID="_tabPanel1" runat="server" AutoHeight="true" Border="true" AutoWidth="true" EnableTabScroll="true">
<Items>
<ext:Panel
ID="_tab1"
runat="server"
Height="470"
Title="Tab 1">
</ext:Panel>
<ext:Panel
ID="_tab2"
runat="server"
Height="470"
Title="Tab 2">
</ext:Panel>
<ext:Panel
ID="_tab3"
runat="server"
Height="470"
Title="Tab 3">
<DirectEvents>
<Activate OnEvent="ActivatePlease" Timeout="60000">
<EventMask ShowMask="true" MinDelay="150" Msg="activating..." />
<ExtraParams>
<ext:Parameter Name="AccountId" Value="123456" />
</ExtraParams>
</Activate>
</DirectEvents>
</ext:Panel>
</Items>
<CustomConfig><ext:ConfigItem Name="idDelimiter" Value="$$" Mode="Value" /></CustomConfig>
</ext:TabPanel>
protected void ActivatePlease(object sender, DirectEventArgs e)
{
var accountId = e.ExtraParams["AccountId"];
if (!String.IsNullOrEmpty(accountId))
{
_tab3.LoadContent(new LoadConfig("http://www.google.co.uk", LoadMode.IFrame, false));
}
}
This code works fine if the tab i wish to go to is not already activated/selectedHowever if i want to refresh the iframe within the tab, what client side method do i need to call? Alternatively, what directevent event should i be calling when i do a reload client side? Please note that if i use the "Update" directevent, the iframe keeps refreshing itself every couple of seconds.
Many Thanks
Lee
Last edited by geoffrey.mcgill; Aug 02, 2010 at 5:20 AM.