Ver Mensaje Individual
  #1 (permalink)  
Antiguo 07/12/2008, 20:32
sergiopdlt
 
Fecha de Ingreso: noviembre-2008
Mensajes: 25
Antigüedad: 15 años, 6 meses
Puntos: 0
Pregunta Crear Ventanas con JavaScript y problema con IE7

Cómo les va muchachos, ojalá alguien pueda ayudarme con esto.
Al usar como browser IE7 este código abre sí una ventana, pero
me muestra todos los archivos guardados en la misma carpeta en donde
se guarde este código. Alguien sabe por qué pasa esto?.......

En FireFox, por el contrario, me muestra lo que yo le digo que muestre.

Cómo hago para que también funcione en IE?

Saludos


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Window</title>
<script type="text/javascript">
function result()
{
newWindow=null;
newWindow=window.open(" ", "newWin", "resizable=yes,width=270,height=300");
newWindow.document.write("<html><head><title>TP3No 2figure2<\/title><\/head><h1>Élections 2008<\/h1><table>");
for(var i=0; i<4; i++)
{
newWindow.document.write("<tr><td>");
newWindow.document.write("A");
newWindow.document.write("<\/td>");
newWindow.document.write("<td>");
newWindow.document.write("B");
newWindow.document.write("<\/td><\/tr>");
}
newWindow.document.write("<tr><td>");
newWindow.document.write('<input type="button" value="Cerrar" onclick="window.close()"/>');
newWindow.document.write("<\/td><\/tr>");

newWindow.document.write("<\/table><\/body><\/html>");
newWindow.document.close();
return 0;
}
</script>
</head>

<body>
<table border="1">
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td colspan="2"><input type="button" value="Prueba de Ventana" onclick="result()"/></td>
</tr>
</table>
</body>
</html>

Última edición por sergiopdlt; 08/12/2008 a las 12:18