I am working on a function that requires 4 parameters
function retrieveToken(uName, pass, link, userRole) {
var self = this;
currentLink = link;
$.ajax({
type: 'GET',
url: "/Base/getConfigUrl",
success: function (data) {
$.ajax({
type: 'GET',
async: false,
url: link + '?username=' + uName + '&password=' + pass,
success: 'handleSuccess',
error : 'handleError',
contentType: "application/json",
dataType: 'jsonp'
});
}
});
Here is the callback function for this operation:
function handleSuccess(responseData) {
// Need to access the outer parameter here
}
While inside the callback function, I need access to the role parameter. After logging the this
variable, I was unable to find any relevant information.