WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 xloadtree synchronization, Alex, October 6, 2004
     Re:xloadtree synchronization, James Agnew, October 10, 2004
         Re:xloadtree synchronization, Jammin, November 3, 2004
             Re:xloadtree synchronization, Erik Arvidsson, November 18, 2004
                 Re:xloadtree synchronization, Adam, November 24, 2004
             Re:xloadtree synchronization, Jammin, November 3, 2004
             Re:xloadtree synchronization, Jammin, November 3, 2004

Subject: Re:xloadtree synchronization From: James Agnew Date: October 10, 2004

Alex

Did you have any luck with this? We're looking to do the same thing and have come up against this problem.

Our situation is that somebody might select a node (via a search facility) in a different frame that's say, 5 levels deep. It's likely that the tree has not expanded to the node, so the sibling nodes of the path are 'unknown' to the user/browser.

The way I see it, you'd need to expand a child node (i.e. call its xml file) only when  a flag e.g. 'loaded' is true. I think your 'while' loop should work. The fact that the browser hangs means that it's in some kind of inifinite loop, so you could perhaps break out of the loop after 3 seconds, just for testing purposes.

If you look at mdsn, that works in pretty much the same way. You find an KB article on google, click the link and the msdn tree unfurls fairly slowly on the left as it pulls in the sibling data, whilst displaying the article in the right window.

Please stay in contact via this board or email as I'd very much like to get this working too.

Regards, James

 

 


 

From: Alex
Sent: October 6, 2004
Subject: Re:xloadtree synchronization

I was wondering if there is a way to synchronize "reaload" calls in xloadtree?

My problem is the following:

- My tree is completely dynamic. When I click on "plus" sign, the subcategories are getting loaded from dynamic xml file (one level at a time).

Now let's say I need to expand tree to some item which is deep in tree. I know all ancestors that need to be opened. If I do a bunch of "reload/expand" statements, I get "undefined" error. The reason is because "reload" or "expand" does not wait for previous "reload"/"expand" to complete.

For example, in the following code

item1.expand();

item1_2.expand()

the second "expand" does not wait first expand to complete. As a result "item1_2" is undefined variable, because it's getting defined in first expand call during dynamic load from xml file.

So is there a way to make second "expand" call to wait for first one before executing. I tried loop "while (!item1.loaded){//do nothing}, but in this case browser just hangs.

Thanks,

Alex





Reply
Name: 
Email: 
Subject: 

Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.


View All Messages
Back to WebFX