I am trying to use the function openItemsDynamic on a tree to open multiple nodes (multi selection tree). If I call the function more than once, it seems to lock up the browser (IE with a stack overflow) or confuse the tree rendering (Firefox). Calling the method only once seems to work fine.

Can you suggest a way to open multiple nodes on a dynamic tree?

Thank you.

If I call the function more than once, it seems to lock up the browser
If you will run its second time, while first run not finished yet ( possible because of async. XML loading ) - the problem may appear.
But you can use the same command, just use all item IDs at once.
Instead of

you can use

I have this same issue, but I am using a single call like:

I have 3 trees in the page using openItemsDynamic method but all use different ID’s etc and do not run at the same time.  It seems to stop on the 3rd ID.

It actually happens in Firefox as well… says this:

too much recursion
Line 23

too much recursionSituation can occur if you have�- non unique IDs in tree, same IDs used for few different items�- you have multiple � tree.openItemsDynamic calls against the same treeIf none of above actual in your case , please provide a sample of init code , for which issue occurs ( you can send it directly to )

We don’t use multiple calls to the same tree.  But it seems to be a hit or miss (errors out usually but 1 out of 20 tries seems to work) so it looks as if it may be a loading issue as if its not waiting for the previous ID to load. 

See here:

Ok some more debugging and I have narrowed it down.

If we use:

When attaching it to the onXLE event like:
tree.attachEvent(“onXLE”,function() {

It fails.

But if we put it in the function for loading XML like:


It works fine.

I think it has to do with your code in: dhtmlxtree_xw.js

     this.onLoadReserve = this.onXLE;
         that.onXLE = that.onLoadReserve;
         if (that._opnItmsDnmcFlg)that.selectItem(that.G_node,true);
         if ((that.onXLE)&&(arguments[1])) that.onXLE.apply(that,arguments);
     var temp=that._globalIdStorageFind(that.G_node);
     if (temp.XMLload===0)

I am not an expert in javascript but it looks to me like its going to continuously loop on the onXLE function?

Actually there are two problems, one caused by the way how you call command - onXLE event triggered each time when portion of XML loaded, so each time when branch loaded from XML event triggered and call tree.openItemsDynamic, which need to be called only once.Second part of issue caused by existing openItemsDynamic method which failed when different openItemsDynamic call executed while previous not finished yet. Some check was added to prevent an error - fixed js file sent by email

Even with the fixed file, the problem persists.

Please provide an example of how we should do this.

Which one of these should we be using?
tree.attachEvent(“onXLE”,function() {




We are using the first one with the file you sent, and the issue persists.

Please use the second approach.