PDA

View Full Version : [CLOSED] Tab page reload



speedstepmem4
Nov 21, 2008, 7:32 AM
hi,

i have tabpanel with two tabs. Each tabs has auloadiframe pages. when i click the tabs , i want reload the aspx page. please tell me how to reload the pages in tabs.






<ext:TabPanel

ID="TabPanel1"

runat="server"

Title="TabPanel"



Border="false"

BodyStyle="background-color: transparent; border: 1px solid #AABBCC; border-top: none;"

TabPosition="top" >

<Tabs>

<ext:Tab ID="Tab1" runat="server" Title="Grid View" AutoLoadIFrame="One.aspx" BodyStyle="background-color: white;">

<Body>



</Body>

</ext:Tab>

<ext:Tab ID="Tab2" runat="server" Title="Normal View" AutoLoadIFrame="Two.aspx" BodyStyle="background-color: transparent;">

<Body>



</Body>

</ext:Tab>

</Tabs>

</ext:TabPanel>
</PRE>

Vladimir
Nov 21, 2008, 8:31 AM
Hi,

Just need to listen Activate event of Tab and call refreshIFrame function



<ext:TabPanel ID="TabPanel1" runat="server" Height="400" Title="TabPanel" Border="false" BodyStyle="background-color: transparent; border: 1px solid #AABBCC; border-top: none;"
TabPosition="top">
<Tabs>
<ext:Tab ID="Tab1" runat="server" Title="Google" ShowIFrameMask="true" AutoLoadIFrame="http://www.google.com" BodyStyle="background-color: white;">
<Body>
</Body>
<Listeners>
<Activate Handler="this.refreshIFrame();" />
</Listeners>
</ext:Tab>
<ext:Tab ID="Tab2" runat="server" Title="Coolite" ShowIFrameMask="true" AutoLoadIFrame="http://www.ext.net" BodyStyle="background-color: transparent;">
<Body>
</Body>
<Listeners>
<Activate Handler="this.refreshIFrame();" />
</Listeners>
</ext:Tab>
</Tabs>
</ext:TabPanel>


Please note that initial all IFrame will be loaded. For example, when page loaded the Google and Coolite sites will be loaded to tabs at once.

May be better solution: remove properties AutoLoadIFrame from Tabs and replace Activate Listeners by


<Listeners>
<Activate Handler="this.loadIFrame('http://www.google.com');" />
</Listeners>


Hope this help

speedstepmem4
Nov 24, 2008, 6:52 AM
hi,
i have use the below code for tab page reload.some times page gets refreshed and some times page is not refreshed. what is the actual probelm? please explain..

<Listeners>
<Activate Handler="this.refreshIFrame();" />
</Listeners>

Vladimir
Nov 24, 2008, 7:12 AM
Hi,

It seems it is caching problem. The browser can cache pages or server can give cached page.
You need to see what requests are sent to the server or go there at all.

jchau
Nov 24, 2008, 11:30 AM
Add the following line to the page's Init or Load to ensure browser doesn't cache your page output. If you have a basepage, that's a better place to put it.



Response.Cache.SetCacheability(HttpCacheability.No Cache)