Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created July 3, 2018 09:15
Show Gist options
  • Save bjoerntx/a7a00ea3546785db60d8d7b13d6dfdf2 to your computer and use it in GitHub Desktop.
Save bjoerntx/a7a00ea3546785db60d8d7b13d6dfdf2 to your computer and use it in GitHub Desktop.
function LoadDocument(filename) {
$('.alert').show();
var bDocument;
var serviceURL = "@Url.Action("LoadDocument", "TX")";
// send document to controller
$.ajax({
type: "GET",
url: serviceURL,
data: {
filename: filename
},
success: successFunc,
error: errorFunc
});
}
function successFunc(data, status) {
TXDocumentViewer.loadDocument(data, "loaded.tx");
TXDocumentViewer.toggleSidebar();
$('.alert').hide();
}
function errorFunc() {
alert("Error");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment