hideelement javascript
i'd like to use the exisiting "hideelement(blah,blah)" javascript vanilla already has included to hide/show the "whisper your comments to" box.... but i can't find where in the code this block of html is rendered! can anyone help?
0
This discussion has been closed.
Comments
The HideElement function is pretty simple:
function HideElement(ElementID, ClearElement) { var Element = document.getElementById(ElementID); if (Element) { Element.style.display = "none"; if (ClearElement == 1) ClearContents(Element); } }It finds any element in the page by it's ID and makes hit display: none. It also optionally clears the innerHtml out of the element.So, to make it work you'd just need to set up a link and then name the id of the element you want hidden. So, for example, if you wanted to hide the menu tabs, you'd do this:
<a href="javascript:HideElement('MenuForum',0)">Hide the menu!</a>