Can I set a callback on the initialisation of the tree from Ajax? With access to the full object passed from the Ajax call? I tried this:
$("#tree").dynatree({
title: "File Browser",
fx: { height: "toggle", duration: 200 },
autoFocus: false,
initAjax: {
url: "../cgi-bin/getchildren.py?nodeid=0",
data: { mode: "funnyMode" },
success : function(node){
alert(node.data.totalsize);
}
},
but the alert didn't fire on init.
This worked for lazy-loading after the first load, though:
onLazyRead: function(node){
node.appendAjax({
url: "../cgi-bin/getchildren.py",
data: {nodeid: node.data.key,
mode: "funnyMode"
},
success : function(node){
alert(node.data.totalsize);
}
});
Peter