Created
December 9, 2015 10:01
-
-
Save bjoerntx/9f5a7e0a86e3d864014b 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
function SaveToController(DocumentName) { | |
TXTextControl.saveDocument(TXTextControl.streamType.InternalUnicodeFormat, | |
function (e) { | |
var serviceURL = "/Home/SaveTemplate"; | |
$.ajax({ | |
type: "POST", | |
url: serviceURL, | |
contentType: 'application/json', | |
data: JSON.stringify({ | |
DocumentName: DocumentName, | |
BinaryDocument: e.data | |
}), | |
success: successFunc, | |
error: errorFunc | |
}); | |
function successFunc(data, status) { | |
alert("Document has been saved successfully."); | |
} | |
function errorFunc() { | |
alert('Error'); | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment