PDA

View Full Version : [2.2] examples/tabs/tabs.html incorrect content



mjlecomte
21 Aug 2008, 6:30 AM
I presume this is the appropriate place to include a 'bug' with the examples. The example does run, so not a code bug, but...

Some of the sample code from examples/tabs/tabs.html is outdated and confusing people. This example loads html into a tab via ajax. The html content describes the process but the content is outdated.


I'm am content loaded via AJAX. I was set up using the setUrl() method on my Ext.TabPanelItem object:
<div style="padding:10px;background:#f1f1f1;"><pre><code>var tab3 = jtabs.addTab('jtabs-3', "Ajax Tab 2");
tab3.setUrl('ajax2.htm', null, true);
</code></pre></div>
Lorem ipsum dolor ...


The current code used:

// second tabs built from JS
var tabs2 = new Ext.TabPanel({
renderTo: document.body,
activeTab: 0,
width:600,
height:250,
plain:true,
defaults:{autoScroll: true},
items:[{
title: 'Normal Tab',
html: "My content was added during construction."
},{
title: 'Ajax Tab 1',
autoLoad:'ajax1.htm'
},{
title: 'Ajax Tab 2',
autoLoad: {url: 'ajax2.htm', params: 'foo=bar&wtf=1'}
},{
title: 'Event Tab',
listeners: {activate: handleActivate},
html: "I am tab 4's content. I also have an event listener attached."
},{
title: 'Disabled Tab',
disabled:true,
html: "Can't see me cause I'm disabled"
}
]
});