如何获取ExtJS中的成功文本? [英] How to get success text in ExtJS?
本文介绍了如何获取ExtJS中的成功文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
function workprogress(){Ext.Ajax.request({
url: 'communication.php',
success: noWork,
failure: yesWork
});}
function noWork() {
infoWindow.hide();
}
function yesWork() {
infoWindow.show();
}
我想将响应文本回显到窗口。您如何捕获来自php文件的响应文本?
I want to echo the response text to the window. How you catch the response text which comes from the php file?
推荐答案
function workprogress(){Ext.Ajax.request({
url: 'communication.php',
success: function(result) {
var response = Ext.decode(result.responseText);
if (response.success) //success true
else //success false
}
failure: function() {
//requests fails completely due to other reasons, timeout ...
}
这篇关于如何获取ExtJS中的成功文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文