Topic: Help with CSS/javascript Color format problem with Mozilla...
Okay, here is my problem :
I added a "color selector" to the my PunBB, but I have a somewhat annoying "bug" with Mozilla.
With IE when I click on a color, it adds the Hex Color Value (extracted from backgroundColor) correctly in the textarea like this :
But with Mozilla, it adds RBG Color Value instead!!
Does anyone knows how I could fix this?
Here's the .js code (ah... and I forgot something -> I use PunBB+ with PunBB 1.1.2 "upgrade" )
function C(obj){
var color;color=(obj.style)?obj.style.backgroundColor:obj.backgroundColor;
formatThis('[color='+color+']', '[/color]');
}
and the function is called from each "colored" TD element (whom id property is set to "c0", "c1", ... "c35" - 35 colors available) with the onclick event handler :
C(this); //short isn't it? -> it was intended to be short
EDIT: Thanks anyway if you don't find a solution (I managed to wolve the problem now)
But I am still wondering if anybody had the same "problem" or if there was a "built-in feature" I didn't know that might had helped me a bit (why Mozilla had to convert Hex values to "rbg"? o_O This is really weird! No one would ever use those in HTML!