Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need cross browser help

Status
Not open for further replies.

ToddR

Programmer
Feb 28, 2001
35
US
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=&quot;text/css&quot;>
<!--
.CellOff {background-color:tan;}
.CellOn {background-color:red;}
-->
</style>

I have the following table:

<table>
<tr>
<td id=&quot;One&quot; name=&quot;One&quot; class=&quot;CellOff&quot; onmouseover=&quot;DoIt(this, 'CellOne', true)&quot;
onmouseout=&quot;DoIt(this, 'CellOne', false)&quot;>
<a href=&quot;./PageOne.htm&quot;>
<img src=&quot;./One.jpg&quot;>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(&quot;document.all.&quot; + CellName);
if (MyCell)
{
if (TurnOn == true)
{MyCell.className = &quot;CellOn&quot;;}
else
{MyCell.className = &quot;CellOff&quot;;}
}
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!

 
as far as I am aware netscape isn't too keen on css, if it uses them at all.

Sorry I couldn't be of much help.




Manic
-----------------------------
I've broken it again !!
-----------------------------
lee.gale@virgin.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top