PDA

View Full Version : NodeInterface destory method executes callback but doesn't honour success:true/false



mehdiraza
29 Sep 2013, 10:27 AM
Hi

I have a problem where the selected node (NodeInterface) when called .destroy({callback:function(node,operation){
if (opertion.success) node.remove(false); // here false argument means don't destroy
}});

Even before executing callback, and regardless of whatever the response returned from server the node disappears from the tree.

Please help.

Regards
Mehdi

mitchellsimoens
14 Oct 2013, 2:07 PM
operation.success should only check for the response status code. Are you returning 200 or something like 400?

mehdiraza
14 Oct 2013, 11:24 PM
Thanks for the post.

The response was 200 and success was false!