in reply to Re^2: tracking where I am in a tree structure
in thread tracking where I am in a tree structure
That was the type of thing I was trying to put together in my head, but for some reason it just wouldn't come together.
Recursive solutions always are harder to wrap your head around, they tend require more "faith" than iterative solutions, and that is not something most programmers are usually accustomed too (all relgious meanings aside of course).
As for the DIV problem, how would you suggest fixing that?
Well not having seen your output I am not sure, but I would suspect you could try putting the 'onClick' handler in the tag you are writing, rather than wrapping that tag. Although this may have the same effect when you are dealing with things like TABLE, TR, UL tags, since they too are container tags which sometimes "enclose" their descendents. The other option, and I am not sure if this would be appropriate or not, is to only wrap your leaf nodes with the "onClick" since they are likely to be text nodes and the like (although things like BR and HR will fall into that category too). Hard to really say without either having some test data, or knowing more about what you want the UI to do in the end.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: tracking where I am in a tree structure
by agaffney (Beadle) on Jul 23, 2004 at 03:26 UTC | |
by stvn (Monsignor) on Jul 23, 2004 at 04:07 UTC | |
|
Re^4: tracking where I am in a tree structure
by FoxtrotUniform (Prior) on Jul 23, 2004 at 01:38 UTC | |
by stvn (Monsignor) on Jul 23, 2004 at 03:50 UTC |