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