family tree

Looking for volunteers to join your project? Need help with a script but can't afford to pay? Want to offer your services as a volunteer to build up your portfolio? This is the place for you...

Moderator: General Moderators

Post Reply
nkt3310
Forum Newbie
Posts: 2
Joined: Thu Jun 24, 2010 10:46 am

family tree

Post by nkt3310 »

greetings,

I have started this self project started 2 years back and since then I am still stuck in the first phase... Kindly refer to my website: http://ramiia.no-ip.info/test.php

Code: Select all

I will be making a family tree website, now for starters I want this settings:

	   A
         /   \
        /     \
       /       \
      B         C
     / \       / \
    /   \     /   \
   D     E   F     G



where A is the child of B and C so on...

also by default when the page loads only A will be visible, upon clicking A her/his parents will show up, clicking B or C will hide A and show their respective parents. What I have in mind is limiting the page height meaning:


if i click A

	   A
         /   \
        /     \
       /       \
      B         C

this is what the user will see assuming the area is set by default 50 (x axis) x 15 (y axis) and clicking B or C will display:




	   B			     C
         /   \			   /   \
        /     \		OR	  /     \
       /       \		 /       \
      D         E		F         G


in the same place as where A's data was previously seen, I do know that this is possible with flash but I want to do this by using PHP and/or Javascript, is  my query seems possible? in the later time letters will be replaced by images (if time permits) or else after the user clicked A his/her parents shows up and A's pictures will load right side after his/her name

I hope you could help me out on this one thank you
FindRoom
Forum Newbie
Posts: 2
Joined: Tue Jul 06, 2010 4:55 am

Re: family tree

Post by FindRoom »

Hello, This is my first post here,

I know how difficult it is, because I faced it once in my previous job, but finally with the help from Allah (the god), because as a Muslim I believe that Allah guided me to the solution, I found the solution and developed it correctly.

I will not give you the code, but I will give you hints to ease your search.

First, divide the page into DIV's , then display the elements as <li></li> list items, when you click on it then using AJAX it will bring up all the data related to it such as children , you can draw the children in <li></li> also.

for the lines and how to draw them, I advice you to use a library
below is the link for it

http://trickyscripter.com/examples/afte ... hics_e.htm

and this ( it is the same )
http://www.c-point.com/javascript_vector_draw.htm

I hope you will do it

Best Regards



Post Reply