Shawn Olson Guestbook

Shawn Olson Guestbook

Shawn Olson said: [ Regarding Altering CSS Class Attributes with JavaScript ]

I have just updated the script to add rules when the properties you want to set are not in the CSS. This may have been your problem when setting values with a dash. However, I could not replicate the dash problem in IE7 or Firefox 2. Could you let me know what browser and version is having that problem?

Subscribe to this guestbook 

Kurt Munro said: [ See Comment Stimulus ]

Had major issues with this, then realised it's because you missed the // after http:// in the javascript src link...

Reinier Post said: [ See Comment Stimulus ]

The problem is that CSS properties with a dash are spelled differently as Javascript DOM .style properties, e.g. background-color corresponds to .style.backgroundColor, so you have to insert a conversion function before you get or set the DOM property. This is true for at least IE 7 and Firefox 2.


Please note that not all of the ideas, opinions and statements made in this guestbook necessarily represent the views and opinions of Shawn Olson.

This guestook is kept spam-free by the protection of the GoodGuest System.

Featured Articles by Shawn Olson

sitemap RGB Color Columbus Photography Free Word Search Maker monty hall game Hangman John Dewey