[thelist] Why is NS6 DHTML so SLOOOOOOOOOWWWWWWW?!

Jacob Stetser lists at icongarden.com
Wed May 9 19:02:51 CDT 2001


<tip type="CSS properties with hyphens in Javascript" author="Jake Stetser">
Some CSS properties, when accessed via Javascript, can't be accessed 
using the CSS name of the property. For example, background-color 
must be accessed as backgroundColor when manipulating or getting the 
property through Javascript.

The hyphen is reserved for other uses in Javascript, so any CSS 
property with a hyphen in its name must be accessed in a similar 
method, I believe.
</tip>

>>There is any limitacion in the attributes I can change with this?
>>the quetion is because i cannot change the background color nor
>>background-image... why?
>>
>>getStyle('mylayer').background-color: "red"
>>do nothing...
>
>Correct syntax:
>
>getStyle('mylayer').background-color = "red"




More information about the thelist mailing list