| Name |
Description |
| ob_prev_selected |
Object. Selected Node. Variable tree_selected_id (see above) is ID of this object.
Object is <TD> element - table cell. Node content goes inside of this cell.
ob_prev_selected.style.border = "2px solid red";
|
| ob_hasChildren(node_object) |
Returns true if node has children. See Example
alert(ob_hasChildren(ob_prev_selected));
alert(ob_hasChildren(document.getElementById("a123"));
|
| ob_isExpanded(node_object) |
Returns true if node is expanded. See Example
alert(ob_isExpanded(document.getElementById("a123")));
|
| ob_nodeIsChildOf(node,
parent) |
Returns true if node is child of parent. See Example
alert(ob_nodeIsChildOf(document.getElementById("a123"), document.getElementById("a12")));
|
| ob_nodeIsSubNodeOf(node,
parent) |
Returns true if node is a subnode of parent (e.g a nephew is a subnode of the grandparent).
See Example
alert(ob_nodeIsSubNodeOf(document.getElementById("a123"), document.getElementById("a1")));
|
| ob_hasSiblings(node) |
Returns true if node has siblings. See Example
alert(ob_hasSiblings(document.getElementById("a123")));
|
| ob_getParentOfNode
(node_object) |
Returns object - parent of node_object. See Example
var myParent = ob_getParentOfNode (document.getElementById("a123"));
|
| ob_getChildCount
(node_object) |
Returns the number of children that node_object has. See Example
alert(ob_getChildCount(document.getElementById("a123"));
|
| ob_getChildAt
(node_object, index, expand) |
Returns the children of node_object at the specified index. If expand is specified
and is true, it will also expand node_object (if needed). See Example
var myThirdChild = ob_getChildAt(document.getElementById("a123"),
3, true);
|
| ob_getIndexOfChild
(node_object) |
Returns what is the index of node_object in its parent's node list. (the reverse
function of ob_getChildAt). See Example
alert(ob_getIndexOfChild(document.getElementById("a123")));
|
| ob_getLastChildOfNode
(node_object, expand) |
Returns object - node which is last child of node_object. If expand is specified
and is true, it will expand node_object (if needed). See Example
var myNode = ob_getLastChildOfNode(document.getElementById("a123"));
|
| ob_getFirstChildOfNode
(node_object, true) |
Returns object - node which is first child of node_object. If expand is specified
and is true, it will expand node_object (if needed). See Example
var myNode = ob_getFirstChildOfNode(document.getElementById("a123"));
|
| ob_getNextSiblingOfNode
(node_object) |
Returns object - node which is next sibling of node_object. See Example
var myNode = ob_getNextSiblingOfNode(document.getElementById("a123"));
|
| ob_getPrevSiblingOfNode
(node_object) |
Returns object - node which is previous sibling of node_object. See Example
var myNode = ob_getPrevSiblingOfNode(document.getElementById("a123"));
|
| ob_getFurthestChildOfNode
(node_object, expand) |
Returns object - node which is the farthest subnode of node_object. If expand is
specified and is true, it will expand all the necessary nodes in order to get to
the furthest child of node. See Example
var myNode = ob_getFurthestChildOfNode(document.getElementById("a123"));
|
| ob_getFirstNodeOfTree
() |
Returns object - node that is the first in the treeview. See Example
var firstTreeNode = ob_getFirstNodeOfTree();
|
| ob_getNodeUp
(node_object, expand) |
Returns object - node that is above node_object in the treeview (regardless of it's
depth level). If expanded is specified, it will ensure that the node above node_object
will be returned even if it's not currently visible. See Example
Note: if expand is false, the function will only make use of the currently visible
nodes.
var nodeAbove = ob_getNodeUp(document.getElementById('a123'),
true);
|
| ob_getNodeDown
(node_object, expand) |
Returns object - node that is below node_object in the treeview (regardless of it's
depth level). If expanded is specified, it will ensure that the node below node_object
will be returned even if it's not currently visible. See Example
Note: if expand is false, the function will only make use of the currently visible
nodes.
var nodeAbove = ob_getNodeDown(document.getElementById('a123'),
true);
|
| ob_getExpanded
(node_object, onlyChildren) |
Returns a comma delimited list of all the ids of the expanded nodes. If node_object
is specified and not null, it will only search the subnode list of node_object,
otherwise it will start with the first node in the tree. If onlyChildren is specified
and is true, it will only search in node_object's children list and not below it,
otherwise it will go all levels deep as available.
See Example
var allExpandedNodesList = ob_getExpanded(null, true);
|
| ob_getCollapsed
(node_object, onlyChildren) |
Returns a comma delimited list of all the ids of the collapsed nodes. If node_object
is specified and not null, it will only search the subnode list of node_object,
otherwise it will start with the first node in the tree. If onlyChildren is specified
and is true, it will only search in node_object's children list and not below it,
otherwise it will go all levels deep as available.
See Example
var allCollapsedNodesList = ob_getCollapsed(null, true);
|
| ob_t2_Add
(parentId, childId, textOrHTML, expanded, image, subTreeURL) |
Adds a node at client side. It behaves exactly like its corresponding server side
function. See Example
ob_t2_Add('a1', 'a12', 'someText', null, 'folder.gif', null);
|
| ob_t2_Remove
(childId) |
Removes the node with childId from the treeview at client side. See Example
ob_t2_Remove('a12');
|
| ob_t2_Move
(parentId, nodeId) |
Moves the node with nodeId under the node with parentId. See Example
ob_t2_Move('a1', 'b2');
|
| ob_t2_UpDown
(direction) |
Moves the selected node up/down within its parent. direction must be 'up' or 'down'
ob_t2_UpDown(direction);
|
| ob_elementBelongsToTree
(node_object) |
Returns true if HTML element belongs to tree. See Example
alert(ob_elementBelongsToTree(document.getElementById("a123")));
|
| ob_t26(list_with_ids) |
Selects nodes on client-side, including dynamically loaded nodes.
ob_t26("a0,b0,c0,z0,z1,z2,z3,z44");
|
| ob_unselectAllNodes() |
Deselects all the selected nodes
|
| ob_change_icons(node_object, image_source) |
Change the icon of a node
|
| ob_t2_getNodeLevel(node_id) |
Returns the level of the node
|