In my site I have a link and you click on it, it runs a javascript function where it gets makes a div visable. This is so people can click the link and get a defintion of a word.
Here is the link:
[HTML]<a href="#" onclick="toggle_visibility('processIslands');">(Wh at are Process Islands?)</a>
[/HTML]
Here is the Div:
[HTML] <div id="processIslands" style="display:none"> Text in the Div </div>
[/HTML]
And here is the function that is called:
Expand|Select|Wrap|Line Numbers
- function toggle_visibility(id) {
- var div = document.getElementById(id);
- if(div.style.display == 'block')
- div.style.display = 'none';
- else
- div.style.display = 'block';
- }
I am using asp.net C# Visual Studio 2005.
Thanks!