Ver Mensaje Individual
  #114 (permalink)  
Antiguo 08/06/2005, 10:21
pepelucho
 
Fecha de Ingreso: enero-2002
Ubicación: Callao - Perú
Mensajes: 1.127
Antigüedad: 22 años, 3 meses
Puntos: 0
ajustar pop-up dependiendo la imagen(con base de datos)

Código PHP:
<!--#include file="conexion.asp" -->
<%
set rs=Server.CreateObject("adodb.recordset")
sql="select *from fotos"
rs.open sql,oconn
%>
<
html>
<
head>
<
title>Untitled Document</title>
<
meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</
head>
<
script language="javascript"

//script por Tunait 
var ventana 
var cont=
var titulopordefecto "Perico de los palotes" //texto por defecto a mostrar en la barra de título en caso de omitir el argumento titulo 

function afoto(cual,titulo

if(
cont==1){ventana.close();ventana=null
if(
titulo==null){titulo=titulopordefecto
ventana=window.open('','ventana','resizable=yes,sc      rollbars=no'
ventana.document.write('<html><head><title>' titulo '</title></head><body style="overflow:hidden" marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" scroll="no" onUnload="opener.cont=0"><img src="' cual '" onLoad="opener.redimensionar(this.width, this.height)">'
ventana.document.close() 
cont++ 

function 
redimensionar(ancho,alto

ventana.resizeTo(ancho+12,alto+28
ventana.moveTo((screen.width-ancho)/2,(screen.height-alto)/2//centra la ventana. Eliminar si no se quiere centrar el popup 

</script> 

<body>
<a href="#" onClick="afoto('imagen/<%=rs("foto")%>','Mi titulo');return false"><img src="imagen/<%=rs("pequena")%>"></a> 
</body>
</html> 
__________________
SaLuDoS dE:
PePeLuChO dEl PeRú PaRa El MuNdO

Última edición por pepelucho; 08/06/2005 a las 10:33