Fórum

ajax response data in complete function

Madasamy P, modificado 7 Anos atrás.

ajax response data in complete function

Junior Member Postagens: 90 Data de Entrada: 27/07/16 Postagens Recentes
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, modificado 7 Anos atrás.

RE: ajax response data in complete function

Regular Member Postagens: 211 Data de Entrada: 18/10/11 Postagens Recentes
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, modificado 7 Anos atrás.

RE: ajax response data in complete function

Junior Member Postagens: 90 Data de Entrada: 27/07/16 Postagens Recentes
Yeah Kailash,

I want to get response data in ajax's complete function
thumbnail
Byrån Zaugg, modificado 7 Anos atrás.

RE: ajax response data in complete function

Expert Postagens: 252 Data de Entrada: 06/04/12 Postagens Recentes
See here: http://alloyui.com/api/classes/A.IORequest.html#attr_responseData

on: {
	complete: function() {
		var data = this.get('responseData');
		alert(data);
	}
}
Madasamy P, modificado 7 Anos atrás.

RE: ajax response data in complete function

Junior Member Postagens: 90 Data de Entrada: 27/07/16 Postagens Recentes
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