Thanks for your response. I tried what you said about the callback, still doesn't work.
The buildSampleTree function returns a json string. Should that return type be different? I pasted that function in there for clarity.
$("#jstree_div").jstree({
'core': {
'data': function (node, cb) { cb(buildSampleTree(kitId, specId)); }
}
});
function buildSampleTree(kitId, specId) {
var ret = null;
$.ajax({
url: '../Result/AjaxGetSamplesJson',
async: false,
type: "POST",
data: JSON.stringify({ kitId: kitId, specId: specId }),
dataType: "json",
contentType: "application/json; charset=utf-8",
error: function (data) { alert('Error: Could Not Reach Server'); },
success: function (data) {
ret = data;
}
});
return ret
}
Thanks again,
Jeff