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: xloadtree synchronization From: Alex Date: October 6, 2004

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