I want save a JStree tree in alternative JSON format. This code I came up with does
save the tree, but it's in the regular JStree JSON format, not the alternative JSON format (using JStree beta 10).
Anyone see what's wrong here?
function saveIt(PostUrl) {
var objtree = $("#jstree_sch").jstree(true).get_json('#', { 'flat' : true });
var fulltree = JSON.stringify(objtree);
$.ajax({
url: PostUrl,
data: fulltree,
type: 'POST',
processData: false,
dataType: "text",
contentType: "text/plain; charset=utf-8",
success: function(results) {
alert("You saved this tree.");
window.location.href = "/main";
}
});
=========
J