Sencha touch getting text into textarea
I am using sencha touch to query a web server which returns text data.
my current code is the following:
Ext.Ajax.request({
url: 'get/log',
method: 'GET',
success: function (result, request) {
alert("Success");
Ext.getCmp('logText').setValue(request)
},
failure: function (result, request) {
alert("FAILED");
Ext.getCmp('logText').setValue(request)
}
});
This is not working as expected as I'm seeing [object Object]
in the text area.
The server is sending the following (as a example).
[17 Oct 10:41:53] Beaco开发者_如何学编程n off
[17 Oct 10:41:53] Beacon on
Does anybody have any advice / experience on how best to get this working.
You can get the server response in result.responseText
. Anyway you should set a breakpoint in the success function and inspect what and where the server is returning.
精彩评论