PDA

View Full Version : innerHTML and Toolbar Item



Gunmen
12 Feb 2010, 1:55 PM
Hi,

I want to change the text of my toolbar item. I'm sure that I have selected the correct item because I can do other operations, like setting the visibility.

The toolbar

tbar:[' ','123']

The edit: change 123 to Logout


i[1].el.innerHTML = 'Logout';


I do not receive an error. However, the text is not changed. When I do i[1].setVisible(false)... this works.

Any ideas how to change the text? Thanks!

tobiu
12 Feb 2010, 3:40 PM
did you try the following?



i[1].el.dom.innerHTML = 'Logout';


or if you are using toolbar.textItems (which you should by default) better:


i[1].el.setText( 'Logout');

kind regards,
tobiu

Gunmen
13 Feb 2010, 4:50 AM
Your first suggestion did work for me.

Thanks!