2 * Ext JS Library 2.2.1
\r
3 * Copyright(c) 2006-2009, Ext JS, LLC.
\r
4 * licensing@extjs.com
\r
6 * http://extjs.com/license
\r
9 Ext.onReady(function(){
\r
10 // basic tabs 1, built from existing content
\r
11 var tabs = new Ext.TabPanel({
\r
16 defaults:{autoHeight: true},
\r
18 {contentEl:'script', title: 'Short Text'},
\r
19 {contentEl:'markup', title: 'Long Text'}
\r
23 // second tabs built from JS
\r
24 var tabs2 = new Ext.TabPanel({
\r
25 renderTo: document.body,
\r
30 defaults:{autoScroll: true},
\r
32 title: 'Normal Tab',
\r
33 html: "My content was added during construction."
\r
35 title: 'Ajax Tab 1',
\r
36 autoLoad:'ajax1.htm'
\r
38 title: 'Ajax Tab 2',
\r
39 autoLoad: {url: 'ajax2.htm', params: 'foo=bar&wtf=1'}
\r
42 listeners: {activate: handleActivate},
\r
43 html: "I am tab 4's content. I also have an event listener attached."
\r
45 title: 'Disabled Tab',
\r
47 html: "Can't see me cause I'm disabled"
\r
52 function handleActivate(tab){
\r
53 alert(tab.title + ' was activated.');
\r