Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created January 6, 2016 17:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjoerntx/d931af107f02e37264b8 to your computer and use it in GitHub Desktop.
Save bjoerntx/d931af107f02e37264b8 to your computer and use it in GitHub Desktop.
function LoadFromController(DocumentName) {
var serviceURL = "/Home/LoadTemplate";
$.ajax({
type: "POST",
url: serviceURL,
contentType: 'application/json',
data: JSON.stringify({
DocumentName: DocumentName
}),
success: successFunc,
error: errorFunc
});
function successFunc(data, status) {
TXTextControl.loadDocument(
TXTextControl.streamType.InternalUnicodeFormat, data);
animateBackstage(1);
}
function errorFunc() {
alert('File could not be loaded');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment