Mostly there is a requirement to submit the form data when the user hits the enter key instead of clicking on the submit button. This can be achieved:
EXTJS4:
listeners: {
afterRender: function(thisForm, options){
this.keyNav = Ext.create('Ext.util.KeyNav', this.el, {
enter: processLogin,
scope: this
});
}
EXTJS3:
keys: {
key: Ext.EventObject.ENTER,
fn: processLogin,
scope:this
}
EXTJS4:
listeners: {
afterRender: function(thisForm, options){
this.keyNav = Ext.create('Ext.util.KeyNav', this.el, {
enter: processLogin,
scope: this
});
}
EXTJS3:
keys: {
key: Ext.EventObject.ENTER,
fn: processLogin,
scope:this
}
Thanks from Munich!
ReplyDeleteYou are Welcomed!!... :)...
Delete