Solved

hiding tables

Posted on 2001-07-23
2
152 Views
Last Modified: 2010-03-31
I am using a SPAN, which calls a function which sets the span to hidden.  This works well, but I want it leaves a plain empty block in the middle of my page.  I want the rest of the page to reflow into the rest of the page, so there is not white block sitting there.
0
Comment
Question by:Gcoopman
  • 2
2 Comments
 

Expert Comment

by:folletxavier
ID: 6311360
Use the style "Display" attribute
/Xavier
0
 

Accepted Solution

by:
folletxavier earned 25 total points
ID: 6311428
Here is some code you can try out:
Just put it in a .htm file and open the file in IE (!<4.0)

<HTML>
<SCRIPT language="JavaScript">
     function ToggleVisible(span)
     {
          if(span.style.display == "")
          {
               span.style.display = "none";
          }
          else
          {
               span.style.display = "";
          }
     }
</SCRIPT>
<BODY>
<SPAN onclick="ToggleVisible(MySpan);">Click here to hide/show.</SPAN>
<BR>
<SPAN id="MySpan" style="DISPLAY:NONE">
<STRONG>Hide/Show</STRONG>
<BR>
</SPAN>

Some text comes here.
<BR>
</BODY>
</HTML>
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question