Re: [PHP] How do I make a HTML tree for a set of nodes?

2006-06-07 Thread Niels
Hi, On Tuesday 06 June 2006 21:05, Jochem Maas wrote: [snip] I might be late to the party but have you thought of trying the YAHOO UI lib (treeview widget) it even allows you to dynamically load subbranches as they are expanded (AJAX lovelyness): http://developer.yahoo.com/yui/treeview/

Re: [PHP] How do I make a HTML tree for a set of nodes?

2006-06-06 Thread Jochem Maas
Niels wrote: Hi, I have a set of nodes. Each node has a parent and so the set can be thought of as a tree. I want to show that tree somehow on a webpage, served by PHP. I cannot use Dot/Graphwiz for various reasons. What I'm looking for is an output of DIVs or tablecells, showing the

[PHP] How do I make a HTML tree for a set of nodes?

2006-06-04 Thread Niels
Hi, I have a set of nodes. Each node has a parent and so the set can be thought of as a tree. I want to show that tree somehow on a webpage, served by PHP. I cannot use Dot/Graphwiz for various reasons. What I'm looking for is an output of DIVs or tablecells, showing the nodes and their

Re: [PHP] How do I make a HTML tree for a set of nodes?

2006-06-04 Thread tedd
At 2:07 PM +0200 6/4/06, Niels wrote: Hi, I have a set of nodes. Each node has a parent and so the set can be thought of as a tree. I want to show that tree somehow on a webpage, served by PHP. I cannot use Dot/Graphwiz for various reasons. What I'm looking for is an output of DIVs or

Re: [PHP] How do I make a HTML tree for a set of nodes?

2006-06-04 Thread Niels
On Sunday 04 June 2006 14:58, tedd wrote: At 2:07 PM +0200 6/4/06, Niels wrote: Hi, I have a set of nodes. Each node has a parent and so the set can be thought of as a tree. I want to show that tree somehow on a webpage, served by PHP. I cannot use Dot/Graphwiz for various reasons. What I'm

Re: [PHP] How do I make a HTML tree for a set of nodes?

2006-06-04 Thread tedd
At 3:03 PM +0200 6/4/06, Niels wrote: On Sunday 04 June 2006 14:58, tedd wrote: At 2:07 PM +0200 6/4/06, Niels wrote: Hi, I have a set of nodes. Each node has a parent and so the set can be thought of as a tree. I want to show that tree somehow on a webpage, served by PHP. I cannot use

Re: [PHP] How do I make a HTML tree for a set of nodes?

2006-06-04 Thread Niels
On Sunday 04 June 2006 15:30, tedd wrote: [snip] You can dynamically generate a table and place text (and/or color) the cells that are nodes -- that would be my approach. You would need to know the width and depth of the tree and then just fill in the cells that are nodes. hth's tedd

Re: [PHP] How do I make a HTML tree for a set of nodes?

2006-06-04 Thread Martin Alterisio
2006/6/4, Niels [EMAIL PROTECTED]: Hi, I have a set of nodes. Each node has a parent and so the set can be thought of as a tree. I want to show that tree somehow on a webpage, served by PHP. I cannot use Dot/Graphwiz for various reasons. What I'm looking for is an output of DIVs or

Re: [PHP] How do I make a HTML tree for a set of nodes?

2006-06-04 Thread Mike Bellerby
You could do it by dynamically generating an image. Mike Niels wrote: On Sunday 04 June 2006 15:30, tedd wrote: [snip] You can dynamically generate a table and place text (and/or color) the cells that are nodes -- that would be my approach. You would need to know the width and depth of

Re: [PHP] How do I make a HTML tree for a set of nodes?

2006-06-04 Thread Niels
On Sunday 04 June 2006 18:37, Mike Bellerby wrote: You could do it by dynamically generating an image. Mike [snip] Yes. But how? I've settled for a simpler solution -- see my answer to Martin Alterisio. Thanks, Niels -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] How do I make a HTML tree for a set of nodes?

2006-06-04 Thread Niels
Hi! On Sunday 04 June 2006 18:13, Martin Alterisio wrote: [snip] I had a similar problem that, although it was with a binary tree, it can be used with your tree. PHP doesn't like too much the use of recursion, but this time recursion is the way to go (if you want to keep the code

Re: [PHP] How do I make a HTML tree for a set of nodes?

2006-06-04 Thread Martin Alterisio
2006/6/4, Niels [EMAIL PROTECTED]: Hi! On Sunday 04 June 2006 18:13, Martin Alterisio wrote: [snip] I had a similar problem that, although it was with a binary tree, it can be used with your tree. PHP doesn't like too much the use of recursion, but this time recursion is the way to go (if

Re: [PHP] How do I make a HTML tree for a set of nodes?

2006-06-04 Thread tedd
At 3:38 PM +0200 6/4/06, Niels wrote: On Sunday 04 June 2006 15:30, tedd wrote: [snip] You can dynamically generate a table and place text (and/or color) the cells that are nodes -- that would be my approach. You would need to know the width and depth of the tree and then just fill in the

Re: [PHP] How do I make a HTML tree for a set of nodes?

2006-06-04 Thread Niels
Hi, On Sunday 04 June 2006 19:02, Martin Alterisio wrote: [snip] Sorry, I can't show you the code. Anyway you don't seem to need it. One recommendation, don't rely on global vars, look at this: Quite right, I'd have gotten around to fixing that later. Thank you for your answer, I appreciate

Re: [PHP] How do I make a HTML tree for a set of nodes?

2006-06-04 Thread Niels
Hi, On Sunday 04 June 2006 19:08, tedd wrote: At 3:38 PM +0200 6/4/06, Niels wrote: On Sunday 04 June 2006 15:30, tedd wrote: [snip] You can dynamically generate a table and place text (and/or color) the cells that are nodes -- that would be my approach. You would need to know the width

Re: [PHP] How do I make a HTML tree for a set of nodes?

2006-06-04 Thread tedd
At 7:26 PM +0200 6/4/06, Niels wrote: If I were to make a real tree, I wouldn't use a table. It's too difficult to manage IMO. I'd probably look for a generic graph algorithm somewhere, and try some dhtml voodoo with flying DIVs. Thanks again, Niels Niels: The below link may not at first look

Re: [PHP] How do I make a HTML tree for a set of nodes?

2006-06-04 Thread Niels
On Sunday 04 June 2006 19:49, tedd wrote: At 7:26 PM +0200 6/4/06, Niels wrote: If I were to make a real tree, I wouldn't use a table. It's too difficult to manage IMO. I'd probably look for a generic graph algorithm somewhere, and try some dhtml voodoo with flying DIVs. Thanks again, Niels

Re: [PHP] How do I make a HTML tree for a set of nodes?

2006-06-04 Thread tedd
At 8:00 PM +0200 6/4/06, Niels wrote: Using a combination of css and php will do what you want, I'm sure of it. I want world peace... Well, if we were all programming php, we wouldn't have any war, but we wouldn't have any peace either. :-) tedd --

Re: [PHP] How do I make a HTML tree for a set of nodes?

2006-06-04 Thread Niels
On Sunday 04 June 2006 20:39, tedd wrote: At 8:00 PM +0200 6/4/06, Niels wrote: Using a combination of css and php will do what you want, I'm sure of it. I want world peace... Well, if we were all programming php, we wouldn't have any war, but we wouldn't have any peace either. :-)

Re: [PHP] How do I make a HTML tree for a set of nodes?

2006-06-04 Thread tedd
At 8:59 PM +0200 6/4/06, Niels wrote: On Sunday 04 June 2006 20:39, tedd wrote: At 8:00 PM +0200 6/4/06, Niels wrote: Using a combination of css and php will do what you want, I'm sure of it. I want world peace... Well, if we were all programming php, we wouldn't have any war, but we