DanLatimer
04 Jul 2006, 03:41 PM
Hey guys,
I found an example somewhere that showed how to make a SPAN tag dissapear and its contents be like removed from the code, and reapear too. like a table in a table and with cellspacing, to make this effect:
<table bgcolor="lightblue" width=150 cellspacing=2>
<tr><td>LINKS</td></tr>
<tr>
<td>
<table bgcolor="white" width=100% cellspacing=0>
<tr><td>HERE IS AN ITEM</td></tr>
<tr><td>HERE IS AN ITEM</td></tr>
</table>
</td>
</tr>
</table>
Most of you have probably saw it before, I want it to be when I click on links the "HERE IS AN ITEM"s dissapear and the white space goes up to readjust for no words being there.
Here is what I have so far:
<table bgcolor="lightblue" width=150 cellspacing=2>
<tr onclick="toggle(HideShow);"><td>LINKS</td></tr>
<tr>
<td>
<span id=HideShow>
<table bgcolor="white" width=100% cellspacing=0>
<tr><td>HERE IS AN ITEM</td></tr>
<tr><td>HERE IS AN ITEM</td></tr>
</table>
</span>
</td>
</tr>
</table>
<script>
function toggle(e) {
if (e.style.visibility == "hidden") {
e.style.visibility = "visible";
}
else {
e.style.visibility = "hidden";
}
}
</script>
if anyone could help me get rid of the extra blue space I would really appreciate that. (you can copy either code straight into a notepad and save it as something.html and it will work as is)
I found an example somewhere that showed how to make a SPAN tag dissapear and its contents be like removed from the code, and reapear too. like a table in a table and with cellspacing, to make this effect:
<table bgcolor="lightblue" width=150 cellspacing=2>
<tr><td>LINKS</td></tr>
<tr>
<td>
<table bgcolor="white" width=100% cellspacing=0>
<tr><td>HERE IS AN ITEM</td></tr>
<tr><td>HERE IS AN ITEM</td></tr>
</table>
</td>
</tr>
</table>
Most of you have probably saw it before, I want it to be when I click on links the "HERE IS AN ITEM"s dissapear and the white space goes up to readjust for no words being there.
Here is what I have so far:
<table bgcolor="lightblue" width=150 cellspacing=2>
<tr onclick="toggle(HideShow);"><td>LINKS</td></tr>
<tr>
<td>
<span id=HideShow>
<table bgcolor="white" width=100% cellspacing=0>
<tr><td>HERE IS AN ITEM</td></tr>
<tr><td>HERE IS AN ITEM</td></tr>
</table>
</span>
</td>
</tr>
</table>
<script>
function toggle(e) {
if (e.style.visibility == "hidden") {
e.style.visibility = "visible";
}
else {
e.style.visibility = "hidden";
}
}
</script>
if anyone could help me get rid of the extra blue space I would really appreciate that. (you can copy either code straight into a notepad and save it as something.html and it will work as is)