[Project_owners] Changing the background color of a statusbarpanel

HJ bugus at universum.org
Thu Nov 18 16:48:40 EST 2004


Didier Ernotte wrote:
> Hi,
> I have this code in my overlay
> 
>   <statusbar id="status-bar">
> [...]
>     <statusbarpanel style="padding:0; border-width:0; margin:0"
> id="newsbar1" insertbefore="statusbar-updates" onclick="clickRSS(1);"/>
>     <statusbarpanel style="padding:0; border-width:0; margin:0"
> id="newsbar2" insertbefore="statusbar-updates" onclick="clickRSS(2);"/>
>     <statusbarpanel style="padding:0; border-width:0; margin:0"
> id="newsbar3" insertbefore="statusbar-updates" onclick="clickRSS(3);"/>
>     <statusbarpanel style="padding:0; border-width:0; margin:0"
> id="newsbar4" insertbefore="statusbar-updates" onclick="clickRSS(4);"/>
>     <statusbarpanel style="padding:0; border-width:0; margin:0"
> id="newsbar5" insertbefore="statusbar-updates" onclick="clickRSS(5);"/>
>   </statusbar> 
> </overlay>
> 
> and I have this javascript code in the associated js file
> 
> function setBackgroundColor()
> {
>   document.getElementById('newsbar1').style.backgroundColor="rgb(" +
> getRed() + "," + getGreen() + "," + getBlue() + ")";
> }
> 
> In this code, if I substitute the backgroundColor by fontWeight, the
> style works fine, but not the backgroundColor .
> 
> Didier

You don't use a label or src attribute in your example, so what 
background do you want to set?

p.s. I would have used:

<hbox class="someclass" insertbefore="statusbar-updates"
       onclick="clickRSS(event.originalTarget.id.replace('someid-',''));">
   <statusbarpanel id="someid-1" class="someotherclass"/>
   <statusbarpanel id="someid-2" class="someotherclass"/>
   <statusbarpanel id="someid-3" class="someotherclass"/>
   <statusbarpanel id="someid-4" class="someotherclass"/>
   <statusbarpanel id="someid-5" class="someotherclass"/>
</hbox>

...because that looks nicer to me ;)

Anyway, I think you need: -moz-appearance: none !important;
but I'm not sure you'll need the !important

/HJ


More information about the Project_owners mailing list