Topic: Error on Mouse over/out when the node is not yet loaded
I get a error 'null is null or not an object' when I move mouse in the container where the tree is being loaded.
This is caused because, in the over & out method of Mif.Tree.Hover class it calls the node.getDOM('wrapper') method but as the node is not yet created( the json is being loaded ) it generates error on the bold line in the code below.
getDOM: function(what){
var node=$(this.tree.DOMidPrefix+this.UID);
if(what=='node') return node;
// THE node IS NULL HERE AS IT IS NOT YET CREATED
var wrapper=node.getFirst();
if(what=='wrapper') return wrapper;
if(what=='children') return wrapper.getNext();
return wrapper.getElement('.mif-tree-'+what);
},
Moro is there any way to prevent this?
Last edited by Sanjay (2009-05-11 12:56:40)