Ver Mensaje Individual
  #5 (permalink)  
Antiguo 29/12/2004, 11:47
Avatar de JavierB
JavierB
Colaborador
 
Fecha de Ingreso: febrero-2002
Ubicación: Madrid
Mensajes: 25.052
Antigüedad: 23 años
Puntos: 772
Hola de nuevo.

Creo que en cualquier caso quedará más claro con un ejemplillo:
Código HTML:
<html>
<head>
<script type="text/javascript">
function mostrar(num,url) {
  obj=document.getElementById('fila'+num);
  if(obj.style.display=='none') {
    obj.style.display='';
    document.getElementById('fra'+num).src=url;
  }
  else
    obj.style.display='none';
}
</script>
</head>
<body>
<table border="1">
<tr onclick="mostrar(1,'http://www.forosdelweb.com')">
<td>1</td><td>Primero</td>
</tr>
<tr id="fila1" style="display:none">
<td colspan="2"><iframe id="fra1"></iframe></td>
</tr>
<tr onclick="mostrar(2,'http://www.maestrosdelweb.com')">
<td>2</td><td>Segundo</td>
</tr>
<tr id="fila2" style="display:none">
<td colspan="2"><iframe id="fra2"></iframe></td>
</tr>
</table>
</body>
</html> 
Saludos,