Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

hiding tables

Posted on 2001-07-23
2
Medium Priority
?
159 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 100 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses

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