Unfortunately, JavaScript and jQuery are not my strong points and I have a question that I know has probably been answered before but I cannot quite find the answer I need.
I have the following code:
var JSLib = {
GetLabelTextFromServer: function (GetHandlesArray, callback) {
$.ajax({
url: "/sorce/Beacon/PageItem/AppAspx/generic/GetLabel.ashx",
type: "POST",
data: JSON.stringify({ 'Labels': GetHandlesArray }),
contentType: 'application/json; charset=utf-8',
success: function (data) {
callback(data);
},
});
}
}
var Tst = {
HTML: function() {
Labels = ["VIEW_ALL_SCASE"];
JSLib.GetLabelTextFromServer(Labels, function(LabelData) {
return '<div class="notificationsShadeFooter"><a href="/sorce/beacon/default.aspx?pageid=notifications" title="Go to the notifications page">' + JSLib.GetLabel(LabelData, "VIEW_ALL_SCASE") +'</a></div>';
});
}
}
Tst.HTML();
What I am trying to get to is the return of the text from the inner function passed to GetLabelTextFromServer() but I am not sure if I am on the right path or if what I want to do is even possible.
Can anyone help me?
Thank you in advance for any help that anyone can offer.