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
7 <body onload="prettyPrint();">
\r
8 <pre class="prettyprint lang-js">/*
\r
10 * Copyright(c) 2006-2008, Ext JS, LLC.
\r
11 * licensing@extjs.com
\r
13 * http://extjs.com/license
\r
17 Ext.QuickTips.init();
\r
19 Ext.onReady(function(){
\r
21 var fp = new Ext.FormPanel({
\r
23 renderTo: Ext.getBody(),
\r
26 buttonAlign: 'right',
\r
28 bodyStyle: 'padding:10px 10px 0;',
\r
32 selectOnFocus: true,
\r
38 blankText: 'Name is required'
\r
41 fieldLabel: 'Birthdate',
\r
42 blankText: 'Birthdate is required'
\r
46 handler: function(){
\r
47 if(fp.getForm().isValid()){
\r
48 var sb = Ext.getCmp('form-statusbar');
\r
49 sb.showBusy('Saving form...');
\r
51 fp.getForm().submit({
\r
53 success: function(){
\r
59 fp.getEl().unmask();
\r
68 title: 'StatusBar with Integrated Form Validation',
\r
69 renderTo: Ext.getBody(),
\r
74 bbar: new Ext.ux.StatusBar({
\r
75 id: 'form-statusbar',
\r
76 defaultText: 'Ready',
\r
77 plugins: new Ext.ux.ValidationStatus({form:'status-form'})
\r