3 * Copyright(c) 2006-2010 Ext JS, Inc.
5 * http://www.extjs.com/license
7 Ext.onReady(function(){
8 // basic tabs 1, built from existing content
9 var tabs = new Ext.TabPanel({
14 defaults:{autoHeight: true},
16 {contentEl:'script', title: 'Short Text'},
17 {contentEl:'markup', title: 'Long Text'}
21 // second tabs built from JS
22 var tabs2 = new Ext.TabPanel({
23 renderTo: document.body,
28 defaults:{autoScroll: true},
31 html: "My content was added during construction."
37 autoLoad: {url: 'ajax2.htm', params: 'foo=bar&wtf=1'}
40 listeners: {activate: handleActivate},
41 html: "I am tab 4's content. I also have an event listener attached."
43 title: 'Disabled Tab',
45 html: "Can't see me cause I'm disabled"
50 function handleActivate(tab){
51 alert(tab.title + ' was activated.');