Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

show text by cliking a link

<html>

<head>

<script type="text/javascript" language="JavaScript"><!--
function toggle(object) {
if (document.getElementById) {
if (document.getElementById(object).style.visibility == 'visible')
document.getElementById(object).style.visibility = 'hidden';
else
document.getElementById(object).style.visibility = 'visible';
}

else if (document.layers && document.layers[object] != null) {
if (document.layers[object].visibility == 'visible' ||
document.layers[object].visibility == 'show' )
document.layers[object].visibility = 'hidden';
else
document.layers[object].visibility = 'visible';
}

else if (document.all) {
if (document.all[object].style.visibility == 'visible')
document.all[object].style.visibility = 'hidden';
else
document.all[object].style.visibility = 'visible';
}

return false;
}
//--></script>

<style type="text/css"><!--
.myStyle { position: absolute; visibility: hidden; }
//--></style>

</head>

<body>

click me

<div id="myLayer1" class="myStyle">

<table bgcolor="#ffffcc"><tr><td>
This text is hidden from view.
It is revealed when the link
is clicked
</td></tr></table>

</div>

</body>

</html>

You need to create an account or log in to post comments to this site.