Voilà, j'ai un code javascript qui marche nickel avec Mozilla FireBird en local.
Problèmes: il ne marche pas avec IE, desfois la barre latérale s'ouvre quand on consulte sur le net (pourtant directories est sur no).
Voici le code,
function popup(img) {
titre="Photo"
w=open("",'image','width=400,height=400,directories=no,location=no,menubar=no,resizable=no,scrollbars=no,status=no,titlebar=yes,toolbar=no');
w.document.writeln("<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>" )
w.document.writeln("<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='fr' lang='fr'><head><title>"+titre+"</title><style type='text/css'>#calque {text-align: center;} .fermer {font-family: Arial,Verdana; font-size: 14px;}</style></head>" )
w.document.writeln("<script type='text/javascript'>function checksize() { if (document.images[0].complete) { window.resizeTo(document.images[0].width+40,document.images[0].height+100); window.focus();} else {setTimeout('checksize()',250) } }</"+"script>" )
w.document.writeln("<body onload='checksize()'><div id='calque'><img src='"+img+"' alt='Photo' /><br /><p class='fermer'><a href='' onclick='window.close();return false;'>fermer</a></p><div></body></html>" )
w.document.close();
}
Y-a-t-il des choses qui vous choquent (c'est mon premier script)?