# dhtmlxtree:event_onopenstart [DHX documentation]

DHTMLX Docs & Samples Explorer

Index
dhtmlxtree

## onOpenStart Event

This event calls user-defined handlers (if there are any) and passes the following parameters:

- id - id of the node that will be opened;
- state - current open state of the item: 0 - item has no child nodes, -1 - item is closed, 1 - item is opened.

            tree.attachEvent("onOpenStart", function(id,state){});

The event returns: true - confirms opening|closing; false - denies opening|closing.