Firefox PHP

Collapse/Expand with JavaScript

Posted by christoph 

i searched the whole web for a hack, but I couldn't find it. maybe someone can help me:
is there a hack which shows the phorum-overview in a collapsed views and expands the thread with a click on the '+' ?
I have right now so large threads that the expanded-view is horrible, but my users want to "preview" the threads and answers easily - so I look for the mentioned hack...

I don't know if you understand what I mean, but I hope so :)
thanks a lot !!
Re: Collapse/Expand with JavaScript
September 12, 2004 02:57PM
there is a tiny JS controlling the display property of an element. here is an example.

function ouvrir(cebloc) {
styleObj = document.getElementById(cebloc).style;
if (styleObj.display=='none') {styleObj.display = '';}
else {styleObj.display = 'none';}

<a href="#" onclick="ouvrir('text');">display text</a>
<p id="text" style="display:none;">text</p>
Sorry, you do not have permission to post/reply in this forum.