Ver Mensaje Individual
  #1 (permalink)  
Antiguo 27/08/2009, 19:57
mariano_donati
 
Fecha de Ingreso: marzo-2005
Mensajes: 1.418
Antigüedad: 19 años, 1 mes
Puntos: 9
Agregar tabla a cuerpo de página

Hola a todos. Tengo este código muy sencillo:

[HIghglight=javascript]
<html>
<head>
<script>
function Initialize()
{

s = document.createElement('table');

row = document.createElement('tr');
cell = document.createElement('td');

cell.innerHTML = 'hi';
row.appendChild(cell);


s.border = 1;
s.width = 200;
s.height = 200;
s.appendChild(row);
document.body.appendChild(s);

}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<body onload="Initialize()">
<!--<div id="s"></div>-->
</body>
</html>
[/Highlight]

Como verán, creo un element table al cual le agrego una fila y una celda a esta fila. Establezco el borde, ancho y alto de la tabla.
En Firefox funciona, pero en IE6 la tabla no se muestra. La página no me da ningún error.
Me está haciendo doler mucho la cabeza!.
No encuentro la solución, si alguien puede darme una sugerencia, voy a estar muy agradecido.

Saludos!.
__________________
Add, never Remove