Hidding And Unhidding

Jul 23, 2005

I have this simple bit of code that when you check a checkbox and it
displays or hides two other fields (well actually two parts of the
document with two different IDs. Pretty straight forward... I thought.
The fields come and go, but something happens to the table formatting;
on NS 7.1 and Firefox 1.0 it seems to miscount or hide the number of TD
tags or something else confusing. Code:

View 3 Replies


ADVERTISEMENT

Hidding Div - Showing Div

Jul 23, 2005

I have something like this in a function:

....
var box = document.getElementById("box");
box.style.visibility = 'hidden'
....

This hides a div setup like the following:

<div id="box">
<table>
<tr><td>Content1</td></tr>
</table>
</div>

But, what if I want to have a another table
replace the table in the div above.

Say I want something like this to replace it:

<table>
<tr><td>Content2</td></tr>
</table>

For this example I have used simple content in my divs. But, in th real case, the div has a large group of nested tables of data.

I want the two to occupy the same space, so when one becomes hidden and the other becomes
visible, it is like they are replacing one another.

Since I have such large amounts of data in one of the tables, I do not want to user innerHTML to do the replacement. Is there any other way I can do it?

View 5 Replies View Related

JQuery :: Hidding UL After H2?

Apr 22, 2011

I have a series of <h2>'s followed by <ul>'s, and I want to have clicking a link in the <h2>'s hide the following <ul>. Here's my approximate html:

<h2><a href="#">Level 2 header</a></h2>
<ul>
<li>List item</li>

[code]....

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved