-
4
Answers
-
Last Activity:
long time ago,
Kathy Judd
Your question has been submitted and is awaiting moderation.
Thank you for reporting this content, moderators have been notified of your submission.
Hi everyone,
I working on a module that will be using ajax request to retrieve data from the server.
I found an example that is used by Journal module. It calls sf.getServiceRoot('Journal') + 'Services.ashx/GetListForProfile'.
But I can't find Services.ashx anywhere. Can anyone point me to tutorials on adding ajax code to modules?
var sf = $.ServicesFramework();
sf.getAntiForgeryProperty(data);
$.ajax({
type: "POST",
url: sf.getServiceRoot('Journal') + "Services.ashx/" + method,
beforeSend: sf.setModuleHeaders,
data: data,
success: function (data) {
if (typeof (callback) != "undefined") {
callback(data,journalId);
}
},
error: function (xhr, status, error) {
alert(error);
}
});