I’ve loaded a tree with tree_connector, and it loads the values from MySQL database:
<?php
require_once('../connect/config.php');
require_once("../codebase/tree_connector.php");
$res=mysql_connect($dbhost, $dbuser, $dbpass);
mysql_select_db("my_database");
$treeConn = new TreeConnector($res,"MySQL");
$treeConn->render_table("my_tablename","node_id","node_name","","node_parent");
?>
I would like to know, how can I set it so it also reads the value node_isopen from my database?
So that the nodes will be open or closed depending on previous user choice.
Also, I watched the video to use dhtmlxdataprocessor.js, but my values in tree do not save to database. Is this html correct?
var stree = new dhtmlXTreeObject("scenTree","100%","100%",0);
stree.setImagePath("codebase/imgs/csh_bluebooks/");
stree.enableDragAndDrop(true, true);
stree.setDragBehavior("complex", true);
stree.enableKeyboardNavigation(true);
stree.enableItemEditor(true);
stree.enableContextMenu(treemenu);
stree.loadXML("connect/get_stree.php");
var treedp = new dataProcessor("connect/get_stree.php");
treedp.init(stree);