You are here: Re: Dynamic updating of background-color within table cells « HTML « IT news, forums, messages
Re: Dynamic updating of background-color within table cells

Posted by Craig Taylor on 12/07/06 20:51

Craig Taylor wrote:
> I'm dynamically creating a table in JS based upon an Ajax response. As
> part of that response I'm wanting to "row"-a-size it so that
> alternating light and dark columns show up.
>
> My JS extract to assign the css is as follows:
> (just added td cell )
> elem.setAttribute( "class", "cssClassName" );
>
> And in the css I have the appropriate class definitions for (in this
> case "dark" and "light" (td.light, td.dark) ).
>
> This works in FireFox just fine and IE renders the cells appropriately
> but is ignoring the setting of the class attribute.

Found the problem - IE doesn't honor a "setAttribute" on the class -
you need to explicitly reference it via a elem.className = "class" to
set the class property.

*grumbles* - IE...

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация