|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
To build a big tree on a web page dynamicaly generated from a DB.
I need to build a big tree on my web page dynamicaly generated from a DB, for example a geneological one. How I can make it the best and easiest? The languages and techniquies I prefer: Perl, javascript, html, postgresql. But other can be adviced.
|
|
#2
|
||||
|
||||
|
Are you looking for any special features like collapsing "branches" or special image enhancements?
This is a database query with standard database-to-output techniques in whatever language you want to output HTML lists.
__________________
# Jeremy Explain your problem instead of asking how to do what you decided was the solution. |
|
#3
|
|||
|
|||
|
Sorry, I didn't understand Your reply. If strictly speaking on geneology tree then I need to output the names of people that have a child-parent relationship with a line at least that shows who bore whom. If my words aren't plain, please, give me a question, I'll the answer.
|
|
#4
|
||||
|
||||
|
The problem is your question is too broad / general. You have to ask a specific question to get a specific answer.
|
|
#5
|
|||
|
|||
|
I want to know the technique to think not out my own: how the developers output their trees if required in the browser window?
|
|
#6
|
||||
|
||||
|
A multi-dimensional associative array is a great way to store a tree. It's basically a list of lists indexed by a value in the parent list. You can then use a recursive function to loop through this tree and create a nested HTML list using <ul> or <ol>.
|
|
#7
|
|||
|
|||
|
Thank You!
Is it possible to build the tree horizontally? |
|
#8
|
||||
|
||||
|
Nested lists will indent beneath their parents, so it would begin to move horizontally. You could use CSS to make the lists inline instead of block elements if you want to really go horizontal. I think I'd have to see an example of the desired output to provide a specific answer.
|
![]() |
| Viewing: Dev Shed Forums > Web Site Management > Scripts > To build a big tree on a web page dynamicaly generated from a DB. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|