Created
July 22, 2019 14:19
-
-
Save bjoerntx/f50e2ba1bd1d0b1c57d035d495405c35 to your computer and use it in GitHub Desktop.
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
// this function loads a document directly server-side | |
function loadDocument(documentName) | |
{ | |
// call the Web API endpoint LoadDocument with the | |
// stored, current ConnectionID | |
var serviceURL = "/api/TXDocument/LoadDocument?ConnectionID=" | |
+ txSettings.ConnectionID + | |
"&DocumentName=" + documentName; | |
$.ajax({ | |
type: "GET", | |
url: serviceURL, | |
contentType: 'application/json', | |
success: successFunc, | |
error: errorFunc | |
}); | |
function successFunc(data, status) { | |
// set the loaded document name | |
loadedDocument = documentName; | |
} | |
function errorFunc() { | |
console.log("An error occured."); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment