View Full Version : Tabbar that loads local html files?

19 Jan 2012, 6:43 AM
Dear all, I'm a sencha starter, and I have a simply question but I can't figure out how to do it. All I want is an application with a tab bar (the 5 icons at the bottom), which load an local HTML file to fill the screen with.

Therefor I have been experimenting with the o'reilly and tab2 examples, but I can't get it to work. I think it has to do with the way I handle the items in the tab bar, but I've been stuck all day so I hope someone can help me?

items: [{ title: 'Home',
iconCls: 'favorites',
cls: 'card1'
card: {
xtype: 'htmlpage',
url: 'about.html'

}, {

19 Jan 2012, 7:23 AM
You shouldn't really mess with the tabbar other than telling it where to dock...

new Ext.TabPanel({
items : [
title : 'One',
html : 'one'
title : 'Two',
html : 'two'

I would create an extension that can handle loading html files via an Ajax call.

19 Jan 2012, 11:46 AM
But how... ? I found the code below for doing that, but I can't get it to work?


url: 'disqus.html',
success: function(response, opts) {
tabPanel.items.get(2).update(response.responseText, true); //2nd parameter is "loadScripts"

20 Jan 2012, 12:06 AM
I'm also interested in this...looks like the example posted after that comment does work, the example is here: http://mklcesenchatest.appspot.com/

You should be able to use this?