Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Last active October 19, 2022 14:09
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/e7d4a69c97fcbcb5847a787b76a1b9a1 to your computer and use it in GitHub Desktop.
Save bjoerntx/e7d4a69c97fcbcb5847a787b76a1b9a1 to your computer and use it in GitHub Desktop.
function storeAnnotations() {
var annotations = TXDocumentViewer.annotations.export();
var obj = JSON.parse(annotations);
var serviceURL = '@Url.Action("MergeAnnotations", "Home")';
$.ajax({
type: 'POST',
url: serviceURL,
contentType: 'application/json',
dataType: 'json',
data: JSON.stringify(obj),
success: successFunc,
error: errorFunc
});
function successFunc(data, status) {
TXDocumentViewer.loadDocument(data.data, 'results.tx');
}
function errorFunc() {
alert('error');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment