开发者

How to submit a form via ExtJS

开发者 https://www.devze.com 2023-01-27 01:09 出处:网络
Ext.get(\'login-o开发者_如何转开发penid-form\').submit(); This isn\'t working, what should I be doing?Ext.get() returns an Ext.Element, not the underlying DOM element.
Ext.get('login-o开发者_如何转开发penid-form').submit();

This isn't working, what should I be doing?


Ext.get() returns an Ext.Element, not the underlying DOM element.

The underlying element is in a property called .dom.

Try:

Ext.get('login-openid-form').dom.submit();

EDIT

If you want to get more Ext-y, you can start to leverage Ext.form.BasicForm:

var form = new Ext.form.BasicForm('login-openid-form', { standardSubmit : true });
form.submit();

That will expose a more robust form API, which is beyond the scope of this answer, but the docs (linked above) are pretty good.

0

精彩评论

暂无评论...
验证码 换一张
取 消