The URL to which the ajax request is sent. It is valid when [setting.async.enable = true]
Default: ""
A url string(e.g. "http://www.domain.com/cgi-bin/my-script.cgi"). Note: please check that the url can be loaded with a browser
Url can also take parameters, please note that they need to be urlencoded.
zTree unique identifier: treeId.
Parent node's JSON data object
When asynchronously loading the root, the treeNode = null
Return value is same as 'String Format'
var setting = {
async: {
enable: true,
url: "nodes.php",
autoParam: ["id", "name"]
}
};
......
function getAsyncUrl(treeId, treeNode) {
return treeNode.isParent ? "nodes1.php" : "nodes2.php";
};
var setting = {
async: {
enable: true,
url: getAsyncUrl,
autoParam: ["id", "name"]
}
};
......