Does this code execute after the DOM is fully loaded? Perhaps there is no panel-hlisting-all yet? If you are using Prototype, you can try:
document.observe("dom:loaded", function() {
document.getElementById('panel-hlisting-all').style.background = color;
});
Just a thought - and I have no way to test it on IE (fortunately / unfortunately), but what if you tried:
document.getElementById('panel-hlisting-all').style.backgroundColor = color;
Added:
Also note, that colormust be a string containing a valid color the CSS ( #FFFFFF, rgb(255,255,255), rgba(255,255,255,1)).
source
share