Function(event, treeId, treeNode, msg)setting.callback.onAsyncSuccess

Overview[ depends on jquery.ztree.core js ]

Used to capture the complete success event when execute ajax.

If you set 'setting.callback.beforeAsync',and return false, zTree will not execute ajax, and will not trigger the 'onAsyncSuccess / onAsyncError' callback.

Default: null

Function Parameter Descriptions

eventjs event Object

event Object

treeIdString

zTree unique identifier: treeId, easy for users to control.

treeNodeJSON

JSON data object of the parent node

When load root nodes, treeNode = null

msgString / Object

The actualnode data which got by ajax. User-friendly debugging.

The actual data's type of msg is affected by 'setting.async.dataType', please refer to JQuery API documentation.

Examples of setting & function

1. When execute ajax complete success, alert message.

function zTreeOnAsyncSuccess(event, treeId, treeNode, msg) {
    alert(msg);
};
var setting = {
	callback: {
		onAsyncSuccess: zTreeOnAsyncSuccess
	}
};
......