comp.lang.javascript FAQ: http://jibbering.com/faq/
comp.lang.javascript FAQ: http://jibbering.com/faq/
comp.lang.javascript FAQ: http://jibbering.com/faq/
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Originally posted by Stan James:
A Java tree usually has a Node object something like:
You walk a tree, and in this case generate HTML, by doing something like:
Are you comfortable with that kind of recursion?
every node puts out a LI tag. If the node has any children, it also puts out a UL tag around the children.
Along the way you need to detect when node is current page and make it text, not a link.
Also note the next link generated and duplicate it in the NEXT link.
Many folks have a strong objection to generating HTML in Java. Once you get this going, we can ask them for alternatives.
comp.lang.javascript FAQ: http://jibbering.com/faq/
comp.lang.javascript FAQ: http://jibbering.com/faq/
Originally posted by Garrett Smith:
Ideally, you would write and test the code for me, I would copy-paste it, and it would work perfectly.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Originally posted by Pat Farrell:
Hey, I'm a professional programmer, I expect to get paid for it to work perfectly.
Originally posted by Pat Farrell:
Looks like you are getting help and making progress.
Java is actually fairly easy to do the node/tree stuff
comp.lang.javascript FAQ: http://jibbering.com/faq/
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi