PDA

View Full Version : Tab Panel and AutoLoad ajax controls not visible



Bounce
8 Mar 2008, 11:48 AM
I am having issues with a tab panel (utilizing the example that autoloads in an ajax fashion, I'm pulling from an html file)

When I visit the page directly without the tab panel the grid panel loads fine, it is just when the page loads in the tab panel it does not show up correctly.

On this page I added some regular text and it shows in the tab panel. I know the script is being read. Any idea what is happening?

hendricd
8 Mar 2008, 12:10 PM
autoLoading is for loading page fragments, not a full page of markup and Javascript libraries.

Doing so could damage the stability of your main page.

If you need to load full pages into an existing Ext layout, consider an iframe instead. ux.ManagedIframePanel (http://extjs.com/forum/showthread.php?t=16590) makes it very easy.

Bounce
8 Mar 2008, 12:45 PM
ok, well in that case. How can I modify the existing code, removing the ajax page and forcing a grid panel. I'm really new to Ext, really at the basics here lol.

That seemed to be a plugin that seems difficult for the novice user to install?


Ext.onReady(function(){
var tabs = new Ext.TabPanel({
renderTo: document.body,
activeTab: 0,
width:600,
height:250,
plain:true,
defaults:{autoScroll: true},
items:[{
title: 'Team Roster',
autoLoad:'bah.html'
},{
title: 'News',
autoLoad:'ajax1.htm'
},{
title: 'Archived Video',
autoLoad:'ajax1.htm'
},{
title: 'Standings/Rankings',
autoLoad: {url: 'ajax2.htm', params: 'foo=bar&wtf=1'}
},{
title: 'Fan\'s Comments',
html: "I am tab 4's content. I also have an event listener attached."
},{
title: 'Premium Content',
disabled:true,
html: "Can't see me cause I'm disabled"
}
]
});


});

hendricd
8 Mar 2008, 1:50 PM
Have you examined any source in the /examples/grid folders? It makes it quite clear how to create grids.