Last active
November 11, 2018 16:25
-
-
Save jinan-kordab/64604827661dc5376b3b78c186af962b to your computer and use it in GitHub Desktop.
Javascript check session state and stats for Spinner
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function checkSessionState() { | |
SessionChecker = window.setInterval(function () { | |
//alert("check session state started"); | |
//check for session using AJAX again: | |
$.ajax({ | |
type: "POST", | |
url: "/Home/CheckForSpinnerSession", | |
success: function (returnedData) { | |
//alert(r); | |
if (returnedData.FileDownloadOK == myGlobalToken) { | |
//alert("before hidespinner"); | |
hideSpinner(); | |
//$(".animatedSpinnerContainer").html("<h2>The time took to download the file is: </h2><br><b><font style=\"color:red\">" + returnedData.FileDownloadTime + "</font></b>"); | |
alert(returnedData.FileDownloadTime); | |
} | |
} | |
}); | |
}, 1000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment