Ver Mensaje Individual
  #9 (permalink)  
Antiguo 25/09/2010, 04:31
Carlos3425
 
Fecha de Ingreso: septiembre-2010
Mensajes: 20
Antigüedad: 16 años, 2 meses
Puntos: 1
Respuesta: Script imagen ajustada de Caricatos

La función quedaría así.

Código PHP:
            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("", "ttttt23", ops);
                
ventana.document.write(contenido);
                
ventana.document.close();
                
ventana.focus();
                
ventana.resizeTo(_img_grande.width,_img_grande.height);
                
ventana.moveTo((screen.width - _img_grande.width) / 2,(screen.height - _img_grande.height) / 2);