Ver Mensaje Individual
  #1 (permalink)  
Antiguo 03/04/2005, 10:11
Avatar de El_Metallick
El_Metallick
 
Fecha de Ingreso: noviembre-2002
Ubicación: Santiago, Chile
Mensajes: 1.718
Antigüedad: 22 años, 5 meses
Puntos: 16
Exclamación a alguien le ha pasado... porque pasa?

hola amigos, mi duda en esta oportunidad es la siguiente:
yo tengo el siguiente código
Código:
<% do while not rs.eof and contador <= cint(tamanopagina) %>
<% if tamanoimg="" then %>
<a href="javascript:displayWindow('img_james.asp?id=<% = RS("ID") %>',<% = RS("Ancho") %>,<% = RS("Alto") %>)"><img src="<% = Img %>/<% = RS("Imagen") %>.<% = RS("Formato") %>" height="125" width="87" border="0" alt="Pulsa para ampliar"></a>
<% end if %>
<% if tamanoimg="100" then %>
<a href="javascript:displayWindow('img_james.asp?id=<% = RS("ID") %>',<% = RS("Ancho") %>,<% = RS("Alto") %>)"><img src="<% = Img %>/<% = RS("Imagen") %>.<% = RS("Formato") %>" height="100" width="70" border="0" alt="Pulsa para ampliar"></a>
<% end if %>
<% if tamanoimg="125" then %>
<a href="javascript:displayWindow('img_james.asp?id=<% = RS("ID") %>',<% = RS("Ancho") %>,<% = RS("Alto") %>)"><img src="<% = Img %>/<% = RS("Imagen") %>.<% = RS("Formato") %>" height="125" width="87" border="0" alt="Pulsa para ampliar"></a>
<% end if %>
<% if tamanoimg="150" then %>
<a href="javascript:displayWindow('img_james.asp?id=<% = RS("ID") %>',<% = RS("Ancho") %>,<% = RS("Alto") %>)"><img src="<% = Img %>/<% = RS("Imagen") %>.<% = RS("Formato") %>" height="150" width="105" border="0" alt="Pulsa para ampliar"></a>
<% end if %>
<% if tamanoimg="175" then %>
<a href="javascript:displayWindow('img_james.asp?id=<% = RS("ID") %>',<% = RS("Ancho") %>,<% = RS("Alto") %>)"><img src="<% = Img %>/<% = RS("Imagen") %>.<% = RS("Formato") %>" height="175" width="122" border="0" alt="Pulsa para ampliar"></a>
<% end if %>
<% if tamanoimg="200" then %>
<a href="javascript:displayWindow('img_james.asp?id=<% = RS("ID") %>',<% = RS("Ancho") %>,<% = RS("Alto") %>)"><img src="<% = Img %>/<% = RS("Imagen") %>.<% = RS("Formato") %>" height="200" width="140" border="0" alt="Pulsa para ampliar"></a>
<% end if %>
<%
rs.movenext

contador=contador+1

loop
%>
Este código al desplegar los resultados de la BD muestra las imagenes con un pequeño espacio entre ellas y que se autoajustan al ancho de la tabla, es decir que automaticamente hacen <BR> (por decirlo asi) cuando llenan la tabla en la que estan

http://web.1asphost.com/forosologuit...eria_james.asp

Pero si los resultados los despliego asi:

Código:
<% 
do while not rs.eof and contador <= cint(tamanopagina) 

if tamanoimg="" then
response.write "<a href=""javascript:displayWindow('img.asp?id=" & RS("ID") & "'," & RS("Ancho") & "," & RS("Alto") & ")""><img src=""" & Img & "/" & RS("Imagen")  & "." & RS("Formato") & """ height=""125"" width=""87"" border=""0"" alt=""Pulsa para ampliar""></a>"
end if
if tamanoimg="100" then
response.write "<a href=""javascript:displayWindow('img.asp?id=" & RS("ID") & "'," & RS("Ancho") & "," & RS("Alto") & ")""><img src=""" & Img & "/" & RS("Imagen")  & "." & RS("Formato") & """ height=""100"" width=""70"" border=""0"" alt=""Pulsa para ampliar""></a>"
end if 
if tamanoimg="125" then
response.write "<a href=""javascript:displayWindow('img.asp?id=" & RS("ID") & "'," & RS("Ancho") & "," & RS("Alto") & ")""><img src=""" & Img & "/" & RS("Imagen")  & "." & RS("Formato") & """ height=""125"" width=""87"" border=""0"" alt=""Pulsa para ampliar""></a>"
end if
if tamanoimg="150" then
response.write "<a href=""javascript:displayWindow('img.asp?id=" & RS("ID") & "'," & RS("Ancho") & "," & RS("Alto") & ")""><img src=""" & Img & "/" & RS("Imagen")  & "." & RS("Formato") & """ height=""150"" width=""105"" border=""0"" alt=""Pulsa para ampliar""></a>"
end if
if tamanoimg="175" then
response.write "<a href=""javascript:displayWindow('img.asp?id=" & RS("ID") & "'," & RS("Ancho") & "," & RS("Alto") & ")""><img src=""" & Img & "/" & RS("Imagen")  & "." & RS("Formato") & """ height=""175"" width=""122"" border=""0"" alt=""Pulsa para ampliar""></a>"
end if
if tamanoimg="200" then
response.write "<a href=""javascript:displayWindow('img.asp?id=" & RS("ID") & "'," & RS("Ancho") & "," & RS("Alto") & ")""><img src=""" & Img & "/" & RS("Imagen")  & "." & RS("Formato") & """ height=""200"" width=""140"" border=""0"" alt=""Pulsa para ampliar""></a>"
end if

rs.movenext

contador=contador+1

loop
%>
las imagenes salen pegadas unas a otras y no hacen ese "<BR>" sino que se muestran hacia el lado, osea no respetan el tamaño de la tabla que las contiene

http://web.1asphost.com/forosologuit...ria_james1.asp

porque es eso?
__________________
Haz la guerra en la cama y el amor donde se te de la gana...
El tiempo es el mejor maestro, lo único malo es que te mata...¡¡Aprovecha tu tiempo!!

Última edición por El_Metallick; 03/04/2005 a las 11:25