Tekstfarve skift
Jeg har problemer med netscape - surprise!Jeg skal bare lave en almindelige \"hover\" function, men kan sørme ikke få det til at virke i netscape.
Hvis der er nogen der har et forslag er de meget velkommen.
Nedenfor følger min kode, class én \"ikontxt\" ligger i en seperat css-fil.
<script language=\"JavaScript\">
<!--
// <layer><ilayer> sandwich er nødvendig for NN4, fordi den ikke understøtter ændring af bgcolor i tabelceller på mouse events.
//layers = netscape
//all = explorer
function onColor(obj){
if (document.all || document.getElementById) //IE
obj.style.color=\"#000000\";
else if (document.layers)//Netscape
obj.fontcolor=\"#000000\";
}
function offColor(obj){
if (document.all || document.getElementById) //IE
obj.style.color=\"#A8000B\";
else if (document.layers)//Netscape
obj.fontcolor=\"#A8000B\";
}
//-->
</script>
<table border=\"0\" cellspacing=\"0\" width=\"770\" cellpadding=\"0\">
<tr>
<td>
<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td colspan=\"2\"><img src=\"images/logo.gif\" width=\"154\" height=\"69\" alt=\"\" border=\"0\"></td>
</tr>
<tr>
<td colspan=\"2\"><%=spacer(1,5)%></td>
</tr>
<tr>
<td><%=spacer(130,1)%></td>
<td><img src=\"images/topovr.gif\" width=\"244\" height=\"18\" alt=\"\" border=\"0\"></td>
</tr>
</table>
</td>
<td></td>
<td align=\"right\" valign=\"bottom\">
<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td align=\"center\" width=\"93\"><a href=\"#\" onMouseOver=\"onColor(free);\" onMouseOut=\"offColor(free);\"><img src=\"images/freesample.gif\" width=\"43\" height=\"47\" alt=\"\" border=\"0\"></a></td>
<td align=\"center\" width=\"92\"><a href=\"#\" onMouseOver=\"onColor(dealer);\" onMouseOut=\"offColor(dealer);\"><img src=\"images/dealer.gif\" width=\"42\" height=\"48\" alt=\"\" border=\"0\"></a></td>
<td align=\"center\" width=\"117\"><a href=\"#\" onMouseOver=\"onColor(thecompagny);\" onMouseOut=\"offColor(thecompagny);\"><img src=\"images/thecompagny.gif\" width=\"67\" height=\"40\" alt=\"\" border=\"0\"></a></td>
<td><%=spacer(20,1)%></td>
</tr>
<tr>
<td colspan=\"4\"><%=spacer(1,2)%></td>
</tr>
<tr>
<td align=\"center\"><a class=\"ikontxt\" href=\"#\" onMouseOver=\"onColor(free);\" onMouseOut=\"offColor(free);\"><span id=\"free\" style=\"position:relative\" class=\"ikontxt\" z-index=\"1\">Free Sample Bag</span></a></td>
<td align=\"center\"><a class=\"ikontxt\" href=\"#\" onMouseOver=\"onColor(dealer)\"; onMouseOut=\"offColor(dealer);\"><span id=\"dealer\" style=\"position:relative\" class=\"ikontxt\" z-index=\"2\">Dealer</span></a></td>
<td align=\"center\"><a class=\"ikontxt\" href=\"#\" onMouseOver=\"onColor(thecompagny)\"; onMouseOut=\"offColor(thecompagny);\"><span id=\"thecompagny\" style=\"position:relative\" class=\"ikontxt\" z-index=\"3\">The Compagny</span></a></td>
<td><%=spacer(20,1)%></td>
</tr>
<tr>
<td colspan=\"4\"><%=spacer(1,10)%></td>
</tr>
</table>
</td>
</tr>
</table>