I've done a lot of intranet development for IE browsers and am trying to port some of the stuff to work on other browsers. Can someone help me?
Here's an example of something I can do in IE, but don't know how to do in Netscape.
I have the following (simplified) style sheet:
<style type="text/css">
<!--
.CellOff {background-color:tan;}
.CellOn {background-color:red;}
-->
</style>
I have the following table:
<table>
<tr>
<td id="One" name="One" class="CellOff" onmouseover="DoIt(this, 'CellOne', true)"
onmouseout="DoIt(this, 'CellOne', false)">
<a href="./PageOne.htm">
<img src="./One.jpg">Picture of One</img>
</a>
</td>
<td ...repeat for all other links
</td>
</tr>
</table>
Here's my DoIt function:
function DoIt(TheCell, CellName, TurnOn)
{
if (isIE)
{
var MyCell;
MyCell = eval("document.all." + CellName);
if (MyCell)
{
if (TurnOn == true)
{MyCell.className = "CellOn";}
else
{MyCell.className = "CellOff";}
}
else
{
var MyCell;
MyCell = eval(TheCell);
if (MyCell)
{if (DoOn != true)
/*How do I change the bgColor of the cell?
HELP!!!!!!!*/
}
}
}
Is there anything equivelant to .className to assign a different style from my style sheet? Are there any other techniques available to change the background color of a table or table cell? Thanks in advance!
Here's an example of something I can do in IE, but don't know how to do in Netscape.
I have the following (simplified) style sheet:
<style type="text/css">
<!--
.CellOff {background-color:tan;}
.CellOn {background-color:red;}
-->
</style>
I have the following table:
<table>
<tr>
<td id="One" name="One" class="CellOff" onmouseover="DoIt(this, 'CellOne', true)"
onmouseout="DoIt(this, 'CellOne', false)">
<a href="./PageOne.htm">
<img src="./One.jpg">Picture of One</img>
</a>
</td>
<td ...repeat for all other links
</td>
</tr>
</table>
Here's my DoIt function:
function DoIt(TheCell, CellName, TurnOn)
{
if (isIE)
{
var MyCell;
MyCell = eval("document.all." + CellName);
if (MyCell)
{
if (TurnOn == true)
{MyCell.className = "CellOn";}
else
{MyCell.className = "CellOff";}
}
else
{
var MyCell;
MyCell = eval(TheCell);
if (MyCell)
{if (DoOn != true)
/*How do I change the bgColor of the cell?
HELP!!!!!!!*/
}
}
}
Is there anything equivelant to .className to assign a different style from my style sheet? Are there any other techniques available to change the background color of a table or table cell? Thanks in advance!