Newsgroup: it.comp.lang.javascript
Titolo: Netscape compatibility (table cell rollover colour and link)

Hi,
I have a site which has a menu which works fine with IE but doesn't work
because of the JavaScript code which makes the menu work.  Until now I have
made do with the small links at the bottom as well but I would like to get
it working properly.
The menu is basically a table (for which the code is below) which has a cell
for each menu entry.  When you rollover a table cell it changes colour, the
mouse changes to a hand and, if you click on the cell, it should go to the
appropriate page.  All this works fine in IE but I was wondering if any of
you out there has any advice which can help to make it 'Netscape proof'.
The site is viewable at 
www.samchurchill.co.uk
 if you like.
Thanks in advance,
Sam
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Code:
<script language="javascript">
function changeCellColour(o_cell, o_colour)
{
   o_cell.style.backgroundColor = o_colour;
   o_cell.style.color = '#ffffff';
}
</script>
<table width="200" border="0" cellpadding="3" cellspacing="1"
class="menutable" style="color: White;" name="Menu">
<tr> <a href="../index.htm">
          <td align="center" style="cursor: hand;  background-color:
#0000FF;" onMouseOver="changeCellColour(this, '#FF0000', '#FFFFFF');"
onMouseOut="changeCellColour(this, '#0000FF', '#FFFFFF');">
            <a href="../index.htm">Home</td></a>
          </a> </tr>
        <tr>
          <td>&nbsp; </td>
        </tr>
        <tr> <a href="../www/consultancy.htm">
          <td align="center" style="cursor: hand;  background-color:
#0000FF;"
   onMouseOver="changeCellColour(this, '#FF0000', '#FFFFFF');"
   onMouseOut="changeCellColour(this, '#0000FF', '#FFFFFF');"> Consultancy
          </td>
          </a> </tr>
        <tr> <a href="../www/websites.htm">
          <td align="center" style="cursor: hand;  background-color:
#0000FF;"
   onMouseOver="changeCellColour(this, '#FF0000', '#FFFFFF');"
   onMouseOut="changeCellColour(this, '#0000FF', '#FFFFFF');"> Websites
          </td>
          </a> </tr>
        <tr> <a href="../www/databases.htm">
          <td align="center" style="cursor: hand;  background-color:
#0000FF;"
   onMouseOver="changeCellColour(this, '#FF0000', '#FFFFFF');"
   onMouseOut="changeCellColour(this, '#0000FF', '#FFFFFF');"> Databases
          </td>
          </a> </tr>
        <tr> <a href="../www/hardware.htm">
          <td align="center" style="cursor: hand;  background-color:
#0000FF;"
   onMouseOver="changeCellColour(this, '#FF0000', '#FFFFFF');"
   onMouseOut="changeCellColour(this, '#0000FF', '#FFFFFF');"> Hardware
          </td>
          </a> </tr>
        <tr> <a href="../www/networking.htm">
          <td align="center" style="cursor: hand;  background-color:
#0000FF;"
   onMouseOver="changeCellColour(this, '#FF0000', '#FFFFFF');"
   onMouseOut="changeCellColour(this, '#0000FF', '#FFFFFF');"> Networking
          </td>
          </a> </tr>
        <tr>
          <td>&nbsp;</td>
        </tr>
        <tr> <a href="../www/clients.htm">
          <td align="center" style="cursor: hand;  background-color:
#0000FF;"
   onMouseOver="changeCellColour(this, '#FF0000', '#FFFFFF');"
   onMouseOut="changeCellColour(this, '#0000FF', '#FFFFFF');"> Clients
          </td>
          </a> </tr>
        <tr> <a href="../www/ecomms.htm">
          <td align="center" style="cursor: hand;  background-color:
#0000FF;"
   onMouseOver="changeCellColour(this, '#FF0000', '#FFFFFF');"
   onMouseOut="changeCellColour(this, '#0000FF', '#FFFFFF');">
E-Communication
          </td>
          </a> </tr>
        <tr> <a href="../www/references.htm">
          <td align="center" style="cursor: hand;  background-color:
#0000FF;"
   onMouseOver="changeCellColour(this, '#FF0000', '#FFFFFF');"
   onMouseOut="changeCellColour(this, '#0000FF', '#FFFFFF');"> References
          </td>
          </a> </tr>
        <tr> <a href="../www/rates.htm">
          <td align="center" style="cursor: hand;  background-color:
#0000FF;"
   onMouseOver="changeCellColour(this, '#FF0000', '#FFFFFF');"
   onMouseOut="changeCellColour(this, '#0000FF', '#FFFFFF');"> Rates</td>
          </a> </tr>
        <tr>
          <td>&nbsp;</td>
        </tr>
        <tr> <a href="../www/contact.htm">
          <td align="center" style="cursor: hand;  background-color:
#0000FF;"
   onMouseOver="changeCellColour(this, '#FF0000', '#FFFFFF');"
   onMouseOut="changeCellColour(this, '#0000FF', '#FFFFFF');"> Contact
            Me </td>
          </a> </tr>
      </table>

 The site is viewable at 
www.samchurchill.co.uk
 if you like.
I saw it with Netscape6 and it works...
however you can have the same effect with a simple css.
MaRoK

 wrote in message
news:eelpa.46925$LB6.1...@news1.tin.it...
