How can i use data outside app.request (ajax method)?

case:

app.request(){
url: ‘…’,
success: function(…){
this.app …; // error: can not use outside var like (this.app).
}
}

u can write code like this

var myResponse;
app.request(){
url: ‘PageMethod/GetData’,
method: ‘post’,
dataType: ‘json’,
data: JSON.stringify({ dataId: “xxx” }),
contentType: ‘application/json’,
success: function (data) {
myResponse = data.d.responseText;
},
error: function (ex) {
alert(ex.responseText);
}
});

thanks 4 share :grinning::grinning::grinning: