ho capito male, prova così:
function popImmagine(immagine,colore){
img = document.images[0]
h = img.width+40;
w = img.height+60;
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings = ',top=' + TopPosition + ',left=' + LeftPosition;
html = '<html><head><script language="javascript">function Adatta(){img=document.images[0];self.resizeTo(img.width+40,img.height+60);}</sc'+'ript></head>\n'
html+= '<body bgcolor="'+colore+'" LEFTMARGIN=10 TOPMARGIN=10
MARGINWIDTH=10 MARGINHEIGHT=10><center>[img]'+immagine+'[/img]</center></body></html>'
pp = window.open('','popImmagine','toolbar=0'+ settings)
pp.document.open()
pp.document.write(html)
pp.document.close()
pp.document.focus = self.blur();
}
non ho idea se funziona correttamente!!

Rispondi quotando