Dynamic tree JavaScript functions
You can use the following JavaScript functions in your
dynamic tree, they are implemented by WebSphere Commerce by default.
The following functions are defined in the parent frame, and are called
using parent.functionName()
:
Function Name | Description |
---|---|
gotoAndHighlightByName(namePath) | Searches the tree for the specified namePath. The namePath is the text displayed in the user interface. If found the tree expands to the specified path and the node or leaf is highlighted. If not found an error message is displayed. |
gotoAndHighlightByValue(valuePath) | Searches the tree for the specified valuePath. The valuePath is the value of the node in the tree. If found the tree expands to the specified path and the node is highlighted. If not found an error message is displayed. |
getNamePath(node) | This function returns the path for the specified node, from the tree root. The path is specified by name, that is the names that display in the user interface. |
getValuePath(node) | This function returns the path for the specified node, from the tree root. The path is specified by value, that is the value of the nodes that display in the user interface. |
getHighlightedNode() | This function returns the current highlighted or selected node. |