Upgrade to ExtJS 3.0.0 - Released 07/06/2009
[extjs.git] / docs / source / hello.html
1 <html>\r
2 <head>\r
3   <title>The source code</title>\r
4     <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />\r
5     <script type="text/javascript" src="../resources/prettify/prettify.js"></script>\r
6 </head>\r
7 <body  onload="prettyPrint();">\r
8     <pre class="prettyprint lang-js">Ext.onReady(function(){\r
9     var win;\r
10     var button = Ext.get('show-btn');\r
11 \r
12     button.on('click', function(){\r
13         // create the window on the first click and reuse on subsequent clicks\r
14         if(!win){\r
15             win = new Ext.Window({\r
16                 applyTo:'hello-win',\r
17                 layout:'fit',\r
18                 width:500,\r
19                 height:300,\r
20                 closeAction:'hide',\r
21                 plain: true,\r
22 \r
23                 items: new Ext.TabPanel({\r
24                     applyTo: 'hello-tabs',\r
25                     autoTabs:true,\r
26                     activeTab:0,\r
27                     deferredRender:false,\r
28                     border:false\r
29                 }),\r
30 \r
31                 buttons: [{\r
32                     text:'Submit',\r
33                     disabled:true\r
34                 },{\r
35                     text: 'Close',\r
36                     handler: function(){\r
37                         win.hide();\r
38                     }\r
39                 }]\r
40             });\r
41         }\r
42         win.show(this);\r
43     });\r
44 });</pre>    \r
45 </body>\r
46 </html>