The POST successfully reaches the server. The problem is that when I go to POST the annotation object, it seems to be empty (apart from the URL with I add myself). Here is a snippet of the Javascript code: ........ this.annotator.subscribe("beforeAnnotationCreated", function(annotation) { annotation.url = document.location.href; }) .subscribe("annotationCreated", function(annotation) { console.log("Created: %o", annotation); jQuery.post("./annotator/create.php", annotation, function(data) { console.log(data); }); })
The console.log successfully prints the annotation object with is valid. But an empty annotation object is being sent to the server (checked server side). I get this error: Uncaught Error: Error while finding start node: undefined: TypeError: Cannot read property 'substring' of undefined If I comment out the jQuery post, the error disappears. Is there something wrong with the Javascript or am I supposed add this functionality outside of pluginInit and where? Thanks, Jamie
_______________________________________________ annotator-dev mailing list annotator-dev@lists.okfn.org https://lists.okfn.org/mailman/listinfo/annotator-dev Unsubscribe: https://lists.okfn.org/mailman/options/annotator-dev