Sorry about that ...
Actually you do have another option - make jstree handle all the data
getting using ajax (html_data config).
All you have to do is call refresh when needed.
$("#topicSelector").change(function() {
$("#topictree").jstree("refresh");
});
$("#topictree").jstree({
html_data : {
ajax : {
url : "getchartheadings.adp"
data : function () { return { "fgid" : $
("#topicSelector").val() }; }
}
// rest of config
Sorry for not thinking of this yesterday :)
Kindest regards,
Ivan
On 29 Септ, 02:58, Steve Carton <
st...@chesbay.net> wrote:
> Thanks Ivan - that's how I'm handling it - I was hoping not to have to
> reinitialize everything. But it works fine.
>
> Steve
>
> On 9/28/2010 3:42 PM, vakata wrote:
>
> > I believe it would be best to simply recreate the tree using the new
> > HTML:
>
> > $.get("getchartheadings.adp?fgid="+fgid, function(opts){
> > $("#topictree").jstree({ "html_data" : { "data" : opts }, /* rest of
> > your config */ });
> > });
>
> > Create node only creates ONE new node (it won't parse children) and it
> > also expects the data in a specific JSON format.
>
> > Kindest regards,
> > Ivan
>
> > On 26 , 17:20, Steve<
st...@chesbay.net> wrote: