我想调用按钮在文本框中输入功能。ExtJS TextField在点击外部按钮后输入按键
items: [
{
xtype: 'form',
id: 'myForm',
items: [
{
xtype: 'textfield',
id: 'myTextField',
listeners: {
specialkey: function(f,e){
if(e.getKey() == e.ENTER){
console.log('Spacial Key = Enter'); // It's working
// But i wanna click btnSearch button click event
}
}
}
}
],
buttons: [
{
text: 'Search',
id: 'btnSearch',
handlers: function(){
// bla bla
// bla bla
// ...
}
}
]
}
]
var myform = Ext.getCmp('myForm');
myForm.getForm().submit()
它的工作,但btnSubmit.click功能无法正常工作
我尝试过,但我用它等待我搜索并使用form.submit()函数。其点击但不发送表单。但.focus()适用于我。谢谢 – 2012-04-27 15:51:04