ahh orale gracias si me sirvio pero no puedo acomodar bien ese codigo al mio no me podrian ayudar??
esta es la linea donde kiero acomodar el codigo, pero no me sirve
Código PHP:
echo "<img src=\"{$pathToThumbs}{$fname}\" onclick=\"abrir(\"{$pathToThumbs}{$fname}\")/>";
ahora tengo que tener el codigo de javascript adentro de los php tags??
este es el codigo javascript
Código PHP:
<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>