1
嘿傢伙所以我想在我的窗口中的按鈕上添加一個簡單的處理程序。該處理器僅設置從一個文本文件中的值的組合框項ID =「wildanimal」ajax extjs有上/下方法的問題
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)
}
})
}
但是我收到一個遺漏的類型錯誤:對象[對象全局]有沒有方法「上」 ......有沒有如何在不使用.up的情況下做到這一點?
哦,我知道了!謝謝 :) –