Código :
{foreach from=$data item=me} <a id="showname" onclick="showname($id={$me.message_id});" > <p>{$me.subject}</p> </a> <hr> <p id="info" style="display: none">{$me.message}</p> --JS-- {literal} <script type="text/javascript" > function showname(id) { var showmessage = document.getElementById('showmessage'); var info = document.getElementById('info'); if(info.style.display == "block") { info.style.display = "none"; } </script>
Att. Gracias