Código HTML:
{section name=ind loop=$datosCompra}
<div id="estado{$datosCompra[ind].id_estado}">
<table align="center" border="0">
<tr>
<td width="300" height="45">Fecha de Inicio: <span style="color: gray;">{$datosCompra[ind].fecha_proceso}</span></td>
</tr>
<tr>
<td height="45">Persona: <span style="color: gray;">{$datosCompra[ind].usuario_proceso}</span></td>
</tr>
<tr>
<td height="45">Cantidad de Días: <span style="color: gray;">{$dias[ind]}</span></td>
</tr>
<tr>
<td height="45">Fecha de Salida: <span style="color: gray;">{$fecha_salida[ind]}</span></td>
</tr>
</table>
</div>
{/section}
<table id="listadoCompras" class="bordered" align="center">
<tbody style="font-size:10px">
{section name=indice loop=$datosCompra}
<tr valign="middle">
<td>
<a href="#" onclick="cambiar_divs('{$datosCompra[indice].id_estado}');">Ver</a>
</td>
</tr>
{/section}
</tbody>
</table> Código HTML:
function cambiar_divs(capa_cambiable){
for(i=0; i<=18; i++){
var capas = 'estado' + i;
if(document.getElementById(capas).style.display=='block'){
document.getElementById(capas).style.display='none';
document.getElementById(capa_cambiable).style.display='block';
}
}
}
Se me ocurre que tal vez se pueda con Jquery pero la verdad nose como podría hacerlo.
Gracias por sus respuestas.


