on 2016 Jun 13 3:24 PM
Hi experts ,
I developed here one oData Get call that is working fine. But form the success function i just need to call one more function there .
So how to call the other function from the success function.
Plz correct me if i may did wrong anywhere. And send me your guidelines.
I attached my coding here .
press :function () {
var surl = "service url here ";
OData.request
({
requestUri:surl,
method: "GET",
headers:
{
"X-Requested-With": "XMLHttpRequest",
"Content-Type": "application/atom+xml",
"DataServiceVersion": "2.0",
"X-CSRF-Token":"Fetch"
}
},
function(data, response) { // onSuccess function called when everything is ok
this.applySearch(); // if i call the function like this i am getting error like this is not a function like that
}
},
applySearh : function () {
}
Thanks and Regards ,
Damian .A
You could set a var to the context of press
var self = this;
and then in you success function
self.applySearch()
There's also other ways such as jQuery.proxy to do the same.
Regards,
Jamie
SAP - Technology RIG
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
10 | |
10 | |
10 | |
10 | |
9 | |
8 | |
7 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.