JavaScript novice here.
I'm attempting to do something like this:
msls.showProgress($.ajax({
url: "/Web/DataImport.ashx",
type: "POST",
contentType: false,
processData: false,
data: file
}).then(
function success(result) {
// Do something
},function error(err) {
// Do something else
})));
Basically, I want the LightSwitch indicator to display until the ajax call returns. However the above code doesn't work, because showProgress is expecting a WinJS.Promise object.
Anyone has an idea on how to to achieve the desired behavior?
Yours,
try this: