hi Dimass,
I understand from your post that you are able to load the section and subsections from a database. I am new in this and i was wondering if you can give sample codes on how to do this.
I am using the default example from dhtmlxScheduler_v4.1.0\samples\06_timeline\03_tree.html and i was trying to replace the code
var elements = [ // original hierarhical array to display
{key:10, label:"Web Testing Dep.", open: true, children: [
{key:20, label:"Elizabeth Taylor"},
{key:30, label:"Managers", children: [
{key:40, label:"John Williams"},
{key:50, label:"David Miller"}
]},
{key:60, label:"Linda Brown"},
{key:70, label:"George Lucas"}
]},
{key:110, label:"Human Relations Dep.", open:true, children: [
{key:80, label:"Kate Moss"},
{key:90, label:"Dian Fossey"}
]}
];
with something like
var elements = mytree.load("mytree.php");
with server mytree.php code as
<?php
require_once(".\dhtmlxScheduler_v4.1.0\samples\common\connector\tree_group_connector.php");
$res = pg_connect(" ... ");
$tree = new TreeGroupConnector($res);
$tree->render_table("employee", "id", "name", "", "dept");
$tree->enable_log("events.log",true);
?>
But i am not sure where to get the module “mytree” to call “mytree.load” or if this is correct at all.
Please advise. Thanks.