2014年12月20日00:33:14-遮罩+進度條-extjs form.isvalid

來源:互聯網
上載者:User

標籤:

1、Extjs : 遮罩+進度條

2、Extjs: extjs form.isvalid

http://stackoverflow.com/questions/19354433/extjs-form-isvalid-is-false-but-how-to-know-why-the-form-is-invalid

EXT API:

http://docs.sencha.com/extjs/3.4.0/

http://dev.sencha.com/deploy/ext-3.x/docs/

http://extjs.cachefly.net/ext-3.1.1/docs/

http://extjs.cachefly.net/ext-3.4.0/docs/

EXT CDN HOME:

http://extjs.cachefly.net/ext-3.1.1/

-----------------------------

http://why100000.com/_others/extjs3.0/index.html

 

進度條+遮罩沒找到,但下面這個也可用。

Ext.onReady(function(){    var loadMarsk = new Ext.LoadMask(Ext.getBody(),{        msg : ‘正在處理,請稍後......‘,        removeMask: true //完成後刪除    });    loadMarsk.show();    //loadMarsk.hide();});
View Code

 

接了一個頁面非常複雜的活,驗證把人搞死,而且,有地方沒有通過extjs內建的驗證,沒法提交,還不要定位,悲劇啊。還好,下面這個+firebug可以協助定位下。

Ext.onReady(function(){    var simple = new Ext.FormPanel({        id: ‘id_formpanel‘,        labelWidth: 75, // label settings here cascade unless overridden        url:‘save-form.php‘,        frame:true,        title: ‘Simple Form‘,        bodyStyle:‘padding:5px 5px 0‘,        width: 350,        defaults: {width: 230},        defaultType: ‘textfield‘,        items: [{                fieldLabel: ‘First Name‘,                name: ‘first‘,                allowBlank:false            },{                fieldLabel: ‘Last Name‘,                name: ‘last‘            },{                fieldLabel: ‘Company‘,                name: ‘company‘            }, {                fieldLabel: ‘Email‘,                name: ‘email‘,                vtype:‘email‘            }, new Ext.form.TimeField({                fieldLabel: ‘Time‘,                name: ‘time‘,                minValue: ‘8:00am‘,                maxValue: ‘6:00pm‘            })        ],        buttons: [{            text: ‘Save‘,            handler: function(){                var formpanel = Ext.getCmp("id_formpanel");                var form = formpanel.getForm();                if(!form.isValid()){                    //console.log( form );                    var formItems = form.items.items;                    Ext.each(formItems, function(ia,i,all){                        //console.log( ia.isValid() );                        if(!ia.isValid()){                            console.log( ia.name );                            console.log( ia );                        }                    });                    return;                }            }        },{            text: ‘Cancel‘        }]    });    simple.render(document.body);});
View Code

 

2014年12月20日00:33:14-遮罩+進度條-extjs form.isvalid

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.