10
I have been using the 'show/hide blocks trick on my personal website with the following code
le="color: #000000"><?php var getById = (typeof document.getElementById != "undefined"); function toggleDisplay(obj,display1,display2) { if(!getById) return; obj = getRef(obj); // If it's set to "none", changes to "block" if(obj.style.display == display2) obj.style.display = display1; else // If it's set to "block", it stays in "block" obj.style.display = display2; repaintFix(); } function getRef(obj) { if(getById) return(typeof obj == "string") ? document.getElementById(obj) : obj; } function repaintFix(obj) { if("undefined" == typeof document.body || "undefined" == typeof document.body.style) return; if(obj == null) obj == document.body; else obj = getRef(obj); document.body.style.visibility = "hidden"; document.body.style.visibility = "visible"; } //-->
and the link image to show/hide...
le="color: #000000"><?php <span style="float: left; width: 23px;"><img name="toggle" src="<{$xoops_imageurl}>images/toggle1.gif" width="23" height="23" border="0" alt="Hide/show left column" class="pointer" onclick="toggleDisplay('leftcolumn','block','none')"></span> <span style="float: right; width: 23px;"><img name="toggle" src="<{$xoops_imageurl}>images/toggle2.gif" width="23" height="23" border="0" alt="Hide/show right column" class="pointer" onclick="toggleDisplay('rightcolumn','block','none')"></span>
This works ok, but when ever I refresh or change the page, the blocks return to the show condition.
How can I make the 'hide'setting remain on all pages until manually reset?
Thanks
Richard