views:

40

answers:

1

Node creation triggered by a function in the thickbox window, after creation the node dissapears. Why could it be happening? Here is my code listing:

$("#treeDiv").jstree("create", 
         "#node_133", 
         "last",
         { 
            "attr" : { "rel" : $("#nodetype option:selected").val().replace("add_","") }, 
            "data" : fratitle 
         }, 
         function() { alert("added"); }, 
         true
 );
A: 

Solved it. Db table id field had no auto_increment attribute. So when callback function were called, r.status and r.id were equal 0 and rollback function were rolling tree back to it's default state and tree node were disappearing after that.

Igor