
This script allows part of the page's content to be hidden or shown by clicking on a link
This version also allow the link's text to rewritten (from show to hide, for example).
Show code example
function showhide2( link, id, showtext, hidetext ) {
if (document.getElementById) {
obj = document.getElementById(id);
if (obj.style.display == "none") {
obj.style.display = "";
link.innerHTML = hidetext;
} else {
obj.style.display = "none";
link.innerHTML = showtext;
}
}
}