Topic: Opening node children in a popup window ( in-page popup using DIV )

Hi, My requirement is to open the node children in a popup window.

  Not to mention it should also be possible to expand/collapse the same in the underlying tree as well.

So far I manged to display the children in a popup( by setting forest:true ). But there are some issues.

-> After the children are displayed in popup. I can not expand the same node in the underlying tree any more.
   As I get this.children.length' is null or not an object error.( This comes from hasChildren() method in Node class )

-> Though it works If I first expand the node in tree and then open popup.( but this not desirable )

I am loading the popup. something like

popTree.load(  {
tree.node.getChildren()
} );

Where popTree is another MIFTree  with forest:true and
'tree' is the orginal underlying MifTree,whose chidlren I want to show in popup.

Any help would be greatly appreciated.

Veroni.

Last edited by Veronika (2009-04-23 10:44:42)

Re: Opening node children in a popup window ( in-page popup using DIV )

Hallo guys,
At least  I found the issue.  In Mif.Tree.Load.children method.
There is for loop which iterates over children and also deletes the children of children.
code snipet

for( var i=children.length; i--; ){
            var child=children\[i\];
            var subChildren=child.children;
            //delete child.children;

The commented line is the problem. As it delete's the children array for all the nodes I want to show in popup. it results
in error ( this.children.length' is null or not an object ) when I try to expand the same node in underlying tree.

Thought it works perfectly when I comment this line but I am not sure if it would have some other side effects?

Moro , could you please put some light on it.:)

Re: Opening node children in a popup window ( in-page popup using DIV )

"delete child.children" line removed  rev87