Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dynamically adjusting the background color of a table
Message
From
06/04/2002 05:56:54
 
 
To
01/04/2002 02:28:43
General information
Forum:
Internet
Category:
Javascript
Miscellaneous
Thread ID:
00639342
Message ID:
00641759
Views:
25
>I need to find a workaround for a bug in Netscape 6.2.
>
>Lets say I have the following:
>
>
><TABLE Style="BackgroundColor=#FFFFFF;" ID="MyTable">
><TR>
><TD>
>...
></TABLE>
>
>
>Now, from javascript:
>
>
>document.getElementById("MyTable").style.backgroundColor="#CCCCCC"
>
>
>This works. From an option on the page, I can dynamically change the background of the table. However, from the same instance of that page, as soon as the background is changed once, it can't be changed again. I have that line in a javascript function which receives a parameter. So, the parameter passed is the color. I can even alert the value of the style and it will tell me that it was well changed. However, on the display, it doesn't changed.
>
>I don't have that bug in IE. I have a normal reaction. However, on NS 6.2, I need to find a way to make it work.


Check whether this is what you need:
document.getElementById('MyTable').style.display='none';
document.getElementById('MyTable').style.backgroundColor='#CCCCCC';
document.getElementById('MyTable').style.display='block';
Note that you should combine this approach with some kind of table formating style, e.g. width of cells, position, etc.

HTH
Zlatin Zlatev,
MCSD (VS6)

Make solutions, not programs!

Previous
Next
Reply
Map
View

Click here to load this message in the networking platform