I customized the tree menu for my own needs. But now I noticed that the selected menu-entry is not displayed 'bold' anymore.
The according code can be found in the function item_select (b_deselect) at the line get_element('i_txt' + this.o_root.n_id + '_' + this.n_id).style.fontWeight = b_deselect ? 'normal' : 'bold';
document.getElementById('i_txt' + this.o_root.n_id + '_' + this.n_id).style.fontWeight = b_deselect ? 'normal' : 'bold';
But the Element looks all the same. No bold text.
If i read out the fontWeight Attribute again it will be set correctly to 'bold':
If I set another style Attribute (e.g. display="none") this will have no consequences, too (but I can read it out again and it is set correctly).
The object I want to modifiy the css-Attribute for seems to exist, because
(document.getElementById(...)) ? alert("yes") : alert("no");
I made some modifcations on the code at other locations. So I cannot say since which modification this error appears. Can someone help me? Who has an idea what I could have made wrong?
Thanks a lot,
should return corect item's content(image and caption);
Good hint. There is the problem:
Here only comes the image (see attached file). But the label is missing. I have no idea...
So probably you working with item (item id - this.n_id) not one you expected to.
sorry, but I do not understand your last answer. What do you mean wA?th "item(item id - this.n_id)"?
How could it happen that I got the wrong elementID?
Great service - your fast replies :)
Try to call:
all should return correct caption of the item.
If caption is correct then the reason probably in changes I can not assume.
The object is the right one (alerts give the right message). So I have to search more.
SOOOORRRY, I made a silly mistake.
I customized the output (=return of the item_init function). And the id we were talking about did exist two times. So it was no wonder,...