Ver Mensaje Individual
  #2 (permalink)  
Antiguo 10/03/2007, 01:51
Avatar de caricatos
caricatos
Moderador
 
Fecha de Ingreso: abril-2002
Ubicación: Torremolinos (Málaga)
Mensajes: 19.607
Antigüedad: 22 años, 11 meses
Puntos: 1284
Re: Mejorar este script

Hola Jocy, bienvenido/a a los foros :

Para ponerle título, deberías usar tags html... tal vez te valga algo así:

function CargarFoto(titulo, img, ancho, alto){
var contenido = "<html><head><title>" + titulo;
contenido += "</title></head><body style='backgound: url(" + img;
contenido += ") no-repeat center center'></body></html>";
derecha=(screen.width-ancho)/2;
arriba=(screen.height-alto)/2;
string="toolbar=0,scrollbars=0,location=0,statusba r=0,menubar=0,resizable=1,width="+ancho+",height=" +alto+",left="+derecha+",top="+arriba+"";
fin=window.open("","",string);
fin.document.open();
fin.document.write(contenido);
fin.document.close();
}

La idea es que en vez de abrir la imagen, abrir una página en blanco y escribir en ella un documento html con la foto.

Pruébalo y nos cuentas.

Saludos
__________________
Por favor:
No hagan preguntas de temas de foros en mensajes privados... no las respondo