Solved

hiding tables

Posted on 2001-07-23
2
148 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
Comment Utility
Use the style "Display" attribute
/Xavier
0
 

Accepted Solution

by:
folletxavier earned 25 total points
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
array6 challenfge 6 62
json format text only 4 64
firstChar challenge 13 82
bitbucket vs gitbucket 3 29
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…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

763 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now