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?