留言板

ajax response data in complete function

Madasamy P,修改在7 年前。

ajax response data in complete function

Junior Member 帖子: 90 加入日期: 16-7-27 最近的帖子
I want to get the response data from servlet in ajax complete function as
on: {
complete: function() {
alert(this.getResponseData());
}

what is the query to get the response data inside complete function
thumbnail
Kailash Yadav,修改在7 年前。

RE: ajax response data in complete function

Regular Member 帖子: 211 加入日期: 11-10-18 最近的帖子
If I understood you question correctly, you want to get response data in ajax's complete function. You can use like this :
complete: function (data) {
     // use data here
}

Madasamy P:
I want to get the response data from servlet in ajax complete function as
on: {
complete: function() {
alert(this.getResponseData());
}

what is the query to get the response data inside complete function
Madasamy P,修改在7 年前。

RE: ajax response data in complete function

Junior Member 帖子: 90 加入日期: 16-7-27 最近的帖子
Yeah Kailash,

I want to get response data in ajax's complete function
thumbnail
Byrån Zaugg,修改在7 年前。

RE: ajax response data in complete function

Expert 帖子: 252 加入日期: 12-4-6 最近的帖子
See here: http://alloyui.com/api/classes/A.IORequest.html#attr_responseData

on: {
	complete: function() {
		var data = this.get('responseData');
		alert(data);
	}
}
Madasamy P,修改在7 年前。

RE: ajax response data in complete function

Junior Member 帖子: 90 加入日期: 16-7-27 最近的帖子
Byrån Zaugg:
See here: http://alloyui.com/api/classes/A.IORequest.html#attr_responseData

on: {
	complete: function() {
		var data = this.get('responseData');
		alert(data);
	}
}



Thank you Bryan ,
It works fine