Ver Mensaje Individual
  #1 (permalink)  
Antiguo 25/01/2004, 19:04
Neron
 
Fecha de Ingreso: abril-2002
Mensajes: 18
Antigüedad: 22 años
Puntos: 0
Javascript que no funciona con Mozilla

Hola amigos,

No soy muy entendido en javascript y he estado toda la tarde tratando de hacer funcionar un menú desplegable en Mozilla (funciona perfecto en IE).

El código javascript es el siguiente:

function fncMuestra(id){
fncOculta(4);
t=eval("table"+id);
t.style.display="";
}

function fncOculta(id){
for (i=2;i<=id;i++)
{
t=eval("table"+i);
t.style.display="none";
}
}

function relTDin(td){
if(document.getElementById||(document.all && !(document.getElementById))){
td.style.backgroundColor="#BBE0BB";
}
}

function relTDout(td){
if(document.getElementById||(document.all && !(document.getElementById))){
td.style.backgroundColor="#E8F4E8";
}
}


y el código que lo llama es el siguiente:

//título que despiega el menú
<a href="#" onclick="fncMuestra(2)">Detalles</a>

//menú que se despliega
<td> <a href="detalle.htm" id="a" onmouseover="relTDin(this)" onmouseout="relTDout(this)" style="cursor:hand">&gt; detalle1</a></td>
<td> <a href="detalle2.htm" id="a" onmouseover="relTDin(this)" onmouseout="relTDout(this)">gt; 'detalle2'</a></td>



Por favor help me!, me estoy volviendo loco

Gracias
Mauricio