## String / Function(treeId, treeNode)setting.async.url

### Overview[ depends on jquery.ztree.core js ]

The URL to which the ajax request is sent. It is valid when [setting.async.enable = true]

Default: ""

### String Format

A url string(e.g. "http://www.domain.com"). Note: please ensure that the url can be loaded

Url can also take parameters, please note that transcode.

### Function Parameter Descriptions

#### treeId String

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

#### treeNode JSON

Parent node's JSON data object

When asynchronously loading the root, the treeNode = null

#### Return String

Return value is same as 'String Format'

### Examples of setting & function

#### 1. set ajax url is "nodes.php"

    var setting = {
    	async: {
    		enable: true,
    		url: "nodes.php",
    		autoParam: ["id", "name"]
    	}
    };
    ......

#### 2. set ajax url is "function"

    function getAsyncUrl(treeId, treeNode) {
        return treeNode.isParent ? "nodes1.php" : "nodes2.php";
    };
    var setting = {
    	async: {
    		enable: true,
    		url: getAsyncUrl,
    		autoParam: ["id", "name"]
    	}
    };
    ......