Source Code
This application is made up of several parts:
Initially the user is presented with the xhtml form where they can enter names of parents and children. They also have the option of selecting to use some demo data.
Clicking on the Add button calls the JavaScript addChild() function to check that all fields are completed, and then calls the drawTree() function which creates an instance of the XMLHttpRequest() object, assembles the parents and children names into a string and passes them up to the php application on the server side.
The php script in the file orgInterface.php receives the string and creates a new instance of the OrgChart object. Creating an object gave it independence from the rest of the application and allows the class to be used elsewhere without this interface.
To see the individual workings and source code for each of the components please follow the links on the site menu or below:


