I am using jstree
and trying to expand a parent node while making an AJAX call.
I tried following the documentation but could not get it working..
_panelContent.jstree({'core': {
'url': function (node) {
console.log('Node', node);
var url = '/mystorage/directory?resourcename=' + node.text;
return url;
},
'data': function () { // loop through the response and push them in data
var results = [];
for (var i = 0; i < _result.length; i++) {
results.push({ id: i, text: _result[i].name, state: 'closed' });
}
return results;
}
} });
What am I doing wrong ?
Only the loading icon comes.... but the call never resolves.. neither the call goes over the network.
But if I hardcode the complete url and do the load without making an AJAX call, jstree renders properly.