I have added toolbar button in firefox using xul and now i want to change background color of that toolbar button in javascript. Anybody please help
My xul button code is:
<toolbox id="navigator-toolbox">
<toolbar id="TutTB-Toolbar" toolbarname="Tutorial Toolbar" accesskey="T"
class="chromeclass-toolbar" context="toolbar-context-menu"
hidden="false" persist="hidden">
<toolbaritem flex="0">
<toolbarbutton id="TutTB-Web-Button" tooltiptext="Search"
label="button" oncommand="alert('ok');" />
</toolbaritem>
<toolbarspring />
</toolbar>
</toolbox>
And i try to access it in javascript through following line of code
var p = document.getElementById("TutTB-Web-Button");
alert(p.textContent);
document.getElementById("TutTB-Web-Button").style.backgroundColor='red';