Ver Mensaje Individual
  #2 (permalink)  
Antiguo 14/05/2004, 05:43
Avatar de KarlanKas
KarlanKas
Moderador extraterrestre
 
Fecha de Ingreso: diciembre-2001
Ubicación: Madrid
Mensajes: 6.987
Antigüedad: 22 años, 5 meses
Puntos: 61
Tenías un par de fallitos (no habías cerrado el body y la función debe estar antes del elemento que la llama). Prueba con esto:
Código PHP:
<script>
var 
win;
win window.open('''POPUP' 'resizable=no, scrollbars=no, status=yes');
var 
425;
var 
390;
        
win.resizeTo(xy);
win.moveTo((screen.width x)/2, (screen.height y)/2);

win.document.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">");
win.document.write("<html>");
win.document.write("<head>");
win.document.write("<meta content=\"text/html; charset=iso-8859-1\" http-equiv=\"content-type\">");
win.document.write("<title>Insertar imagen</title>");
win.document.write("</head>");
win.document.write("<body topmargin=\"0\" leftmargin=\"0\" rightmargin=\"0\" bottommargin=\"0\" marginheight=\"0\" marginwidth=\"0\">");
win.document.write("<scr"+"ipt>");
win.document.write("function show() {");
win.document.write("    alert(document.getElementById('p').contentWindow.document.body.innerHTML);");
win.document.write("    return false;");
win.document.write("}");
win.document.write("<\/scr"+"ipt>");
win.document.write("<iframe id=\"p\" src=\"x.html\" onload=\"show();\"></iframe>");

win.document.write("</body>");
win.document.write("</html>");
win.document.close();
</script> 
__________________
Cómo escribir

No hay pregunta tonta, sino tonto que quiere seguir en la ignorancia.