Ver Mensaje Individual
  #8 (permalink)  
Antiguo 11/08/2006, 14:53
Martine
 
Fecha de Ingreso: septiembre-2004
Mensajes: 362
Antigüedad: 20 años, 6 meses
Puntos: 1
Caricatos, Gracias de Nuevo.

Voy a escribir como quedaría el código para que pase la validación XHTML 1.1 (http://validator.w3.org/)

Cita:
<script type="text/javascript">
<!--
//
var _img_grande;

function mostrar() {
var ops = "top=" + ((screen.height - _img_grande.height) / 2);
ops += ",left=" + ((screen.width - _img_grande.width) / 2);
ops += ",width=" + _img_grande.width + ",height=" + _img_grande.height;
var contenido = "<html><body style='background-image: url(" + _img_grande.src + ")'></body></html>";
var ventana = window.open("", "", ops);
ventana.document.write(contenido);
ventana.document.close();
}

function cargando() {
if (_img_grande.complete) mostrar();
else setTimeout("cargando()", 100);
}

function abrir(imagen) {
_img_grande = new Image();
_img_grande.src = imagen;
cargando();
}//
// -->
</script>


</head>

<body>

<img src=".../tu_imagen_chica.jpg"
onclick="abrir ('.../tu_imagen_grande.jpg')"
width="118" height="118"
style="border-style:none; margin-left:10px; margin-right:10px; vertical-align:text-top; cursor: pointer" alt="Larger Picture" />
Sólo habría que modificar:
width, height, alt, margin...

En el siguiente enlace puse otro post consultando la preferencia de los visitantes para ver el pop up de dos formas distintas:

http://www.forosdelweb.com/showthread.php?t=416498

Otra vez Caricatos: Gracias !!!
__________________
Saludos,

Martin