mi instruccion para ke salga la imagen es:
<img src="/images/fotos/<%=foto%>" alt=" " width="170" height="170" border="0" TARGET="_self"></a></td>
por favor espero me puedan ayudar.

|
|
#1 (permalink) |
![]() Fecha de Ingreso: febrero-2007
Mensajes: 13
|
if para imagenes en una tabla
mi instruccion para ke salga la imagen es: <img src="/images/fotos/<%=foto%>" alt=" " width="170" height="170" border="0" TARGET="_self"></a></td> por favor espero me puedan ayudar. ![]() |
|
|
|
|
|
#4 (permalink) |
![]() Fecha de Ingreso: noviembre-2002
Ubicación: Vitoria - Madrid
Mensajes: 229
|
Re: if para imagenes en una tabla
Código:
donde condicion debería ser una variable booleana que te indicara si tienes o no la foto.<img src="/images/fotos/<%=condicion ? foto : 'nombreimagenvacia.jpg' %>" alt=" " width="170" height="170" border="0" TARGET="_self"></a></td> Salu2 |
|
|
|
|
|
#5 (permalink) |
![]() Fecha de Ingreso: febrero-2007
Mensajes: 13
|
Re: if para imagenes en una tabla
pues ya puse eso pero no funciono, tb lo puse asi:
<% int indx = 0; Iterator it = productos.iterator(); while(it.hasNext()) { indx ++; ProductoTO producto = (ProductoTO)it.next(); String foto = ""; try { foto = producto.clproducto.substring(0, 3) +"/"+producto.clproducto+".jpg"; } catch(Exception e) { } java.io.File imagen = new java.io.File("/images/fotos/"+foto); if(!imagen.exists()) foto = "nodisponible.jpg"; %> <tr> <td align="center"><a href="/adorote/catalogo/detalleo.jsp?codigo=<%=producto.clproducto%>" TARGET="_self"> <img src="/images/fotos/<%=foto%>" alt=" " width="170" height="170" border="0" TARGET="_self"></a></td> <td><%=producto.clproducto%></td> <td><a href="/adorote/catalogo/detalleo.jsp?codigo=<%=producto.clproducto%>" TARGET="_self"> <%=producto.dsproducto%></a></td> |
|
|
|