Click to See Complete Forum and Search --> : onClick calls text block...


xataku_nakusute
07-20-2003, 03:34 AM
the title of this thread pretty much says it all.....
i need a link to make a block of text appear directly underneath it and then when clicked on again, disappear...

if this is possible pleaz help me out

thanx

)(aTaKu_(\)aKuSuTe

pyro
07-20-2003, 09:26 AM
Try something like this:

<script type="text/javascript">
function showText() {
obj = document.getElementById("mydiv");
obj.style.display == "block" ? obj.style.display = "none" : obj.style.display = "block"; // {
}
</script>
</head>

<body>
<a href="#" onclick="showText(); return false;">Show</a>
<div id="mydiv" style="display:none;">This is a block of text.</div>

xataku_nakusute
07-20-2003, 08:16 PM
THANK YOU OH SO VERY MUCH!
(sorry if i seem a bit......ehh...carried away...hehe)

XaTaKu_NaKuSuTe

pyro
07-20-2003, 08:25 PM
lol... :D You're welcome...