Solved

hiding tables

Posted on 2001-07-23
2
155 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

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…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
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…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses

623 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