Text Box below link

admin

Administrator
Staff member
I'm wondering if anyone knows what the code is for my situation. I would like to have a link, that once clicked opens a box below it with text. Any suggestions?<!--content--><!-- in <head> --><br />
<script type="text/javascript"><br />
window.onload=document.getElementByID('text').display=none;<br />
</script><br />
<br />
<!-- wherever you want the textbox/link to be on the page --><br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"javascript:document.getElementByID('text').style.display=block;" title="make the text appear!">Show text!</a><br />
<div id="box">This text appears when the link is clicked.</div><br />
Note that this uses Javascript, so it is not recommended for situations in which the text MUST be invisible before the link is clicked. If the user has Javascript disabled, the text will always be visible, even without the link being clicked.<br />
-Dan<br />
<br />
**EDIT**<br />
There should not be a space between java and script in the word javascript. These forums have a bad habit of putting in spaces where there shouldn't be any. :mad:<!--content-->
 
Back
Top