Skip to forum content
Mif
— mystic javascript interface
You are not logged in. Please login or register.
Active topics Unanswered topics
Post new reply
Post new reply
Compose and post your new reply
You may use: BBCode Images Smilies
All fields labelled (Required) must be completed before the form is submitted.
Topic review (newest first)
I have modified your code because of an error :
Uncaught TypeError: Cannot call method 'indexOf' of null : line 1 (surely on this.$index == null)
Mif.Tree.implement({
del: function()
{
this.UID = 0;
this.$ = {};
this.$index = []; // Array, not null
this.mouse.node = false;
this.unselect();
this.wrapper.innerHTML = '';
}
});
Thanks for the help!
Thank you moro, that works great 
PS: Sorry for the late feedback...
Mif.Tree.implement({
del: function(){
this.UID=0;
this.$={};
this.$index=null;
this.mouse.node=false;
this.unselect();
this.wrapper.innerHTML='';
}
});
Hi Moro,
How do you delete the content of a tree? (or subtree)
I have a Mif.Tree object which I populated using load(json...). But I would like to clear it to re-populate it with new data. If I call load twice, the new data is appended to the previous one.
Cheers,
Peter