 |
| 09/08/2004 11:07 |
 |

Registrado: 14/04/2004
Nº mensajes: 425
 |
|
 |
| |
Moriarty |

|
|
 |
| |
tengo una galería de imágenes en flash y cuando das a una de ellas se llama a una función javascript para que abra un pop-up.. dependiendo de si la imagen tiene pie de foto o no la ventana tendrá una altura determinada.
Una preguntita...
Cómo hacer para situar el pop-up donde yo quiera en pantalla... por ejemplo, siempre centrado independientemente de la resolución? He mirado en sitios pero me parece demasiado complicado, seguro que hay una forma muy sencilla de hacerlo, no?
ésta es la función
<script language="JavaScript"> function cambiaColor(elemento,color) { elemento.style.backgroundColor=color; } function abrirv(imagen,pie){ var h if (pie== ''){ h=223; } else { h=280; } var ven=window.open('','','width=305, height='+h+',status=0, menubar=0,toolbar=0, resizable=0'); ven.document.write("<html><head><LINK href='/css.css' type='text/css' rel='stylesheet'></head><body>"); ven.document.write("<img src='"+ imagen +"'>"); if (h==280){ ven.document.write("<table align='center' width='96%'><tr><td align='center'>"+ pie +"</td></tr></table>"); } ven.document.write("</body></html>"); ven.document.close(); ven.focus(); } </script>
y ésta es la llamada desde una de las fotos
on (release) { getURL ("javascript:abrirv('/ciudadano/etco/images/etco_01_03.jpg','')\r\n"); }
|
|
|
| |

"Naruhito saludiiiiito... ni rastro de Hannoooover"
|
|
 |
 |
| 10/08/2004 12:01 |
 |

Registrado: 14/04/2004
Nº mensajes: 491
 |
|
 |
| |
Living |

|
|
 |
| |
Perdona que no te haya escrito antes, se me había pasado  . Bueno, aquí lo tienes para cualquier resolución. Tan sólo sustituye tu función por esta: function abrirv(imagen,pie){ var anchoPantalla=screen.width; var altoPantalla=screen.height; var h if (pie== ''){ h=223; } else { h=280; } var ven=window.open('','','width=305, height='+h+',left='+(anchoPantalla-305)/2+',top='+(altoPantalla-h)/2+',status=0, menubar=0,toolbar=0, resizable=0'); ven.document.write("<html><head><LINK href='/css.css' type='text/css' rel='stylesheet'></head><body>"); ven.document.write("<img src='"+ imagen +"'>"); if (h==280){ ven.document.write("<table align='center' width='96%'><tr><td align='center'>"+ pie +"</td></tr></table>"); } ven.document.write("</body></html>"); ven.document.close(); ven.focus(); }
|
|
|
| |

El mayor placer de un hombre inteligente es aparentar ser idiota, delante de un idiota que aparenta ser inteligente.
|
|
 |
 |
|