【发布时间】:2013-07-13 06:02:47
【问题描述】:
大家好,我正在尝试在我的窗口中的按钮上添加一个简单的处理程序。处理程序只是将文本文件中的值设置为组合框项 id = 'wildanimal'
items: [{
itemId: 'button1',
xtype: 'button',
text: 'click the button',
handler: function(){
Ext.Ajax.request({
url: 'stuff.txt',
method: 'GET',
success: function (result){
this.up('Ajax').down('wildAnimal').setValue(result.responseText)
}
})
}
但是我收到 Uncaught TypeError: Object [object global] has no method 'up' ... 有没有不使用 .up 的方法来做到这一点?
【问题讨论】: