Rather than loading a new page, there's an easier way to collapse/expand the forum listings without making a call to the server and using up bandwidth and MySQL requests:
1) Make sure each forum section has an inline id, say DROD and Other.
2) Change the anchor target from the URL to "
javascript:switchVisibility('DROD');"
(or ('Other'))
3) Make sure the + and - images are in spans that also have IDs, say img_DROD and img_Other
4) Write the following javascript:
boxes = new Array();
function switchVisibility(id) {
panel = getElement(id);
if (!boxes[id]) {
boxes[id] = panel.innerHTML;
panel.innerHTML = '';
document['img_' + id].src = '/forum/images/caravelnet/expandPlus.gif';
}
else {
panel.innerHTML = boxes[id];
boxes[id] = false;
document['img_' + id].src = '/forum/images/caravelnet/expandMinus.gif';
}
}
function getElement(name) {
return document.getElementById?document.getElementById(name):document.all[name];
}
Voila, the forums collapse and expand without having to call the server again
____________________________
Deploy the... I think it's a yellow button... it's usually flashing... it makes the engines go... WHOOSH!