Hi all, i have a problems with tree:
I dont wand to permit users to move nodes to root node, so i give id to root not and add check to beforemove,

but nothing happend, only waht i get just a log in console.

Thanx For ant help !!
PHP Code:
jobTree = new Ext.tree.TreePanel ({
                   id: 'jobTreeId',
                   enableDD: true,
                   title: 'Jobs Tree',
                   width: '50%',
                   animate: true,
                     height: 500,
                         width: 300,
                         containerScroll: true,
                         loader: new Ext.tree.TreeLoader({
                            dir: 'asc',
                            url: '<?php echo base_url();?>job/getTreeCheck',
                            requestMethod: 'POST',
                            params: { level : 'root' }
                          root:   new Ext.tree.AsyncTreeNode({
                            id: 'jobTreeRootId',

  jobTree.on('beforemovenode', function(tree, node,oldParent, newParent, index) {
      if(newParent.id !=   'jobTreeRootId'){
          url: '<?php echo base_url();?>job/moveJob',
          params: {
          nodeid: node.id,
          newparentid: newParent.id,
          oldparentid: oldParent.id,
          dropindex: index
            success: function () {

            failure: function () {