Solved

Problem making DIV tags Visible and Hidden

Posted on 2004-09-25
3
955 Views
Last Modified: 2012-06-21
I'm running across a problem when trying to make Div tag visible and hidden.

Here is an example:
http://felix2000.myftp.org/test/test1.html

When you click on the names Network Advisories, Network Handoffs it toggles the corresponding div tags to hidden or back to visible it also changes the position from relative to absolute so that it will shrink down.

What you will notice those is when trying to make it visible again the area comes back but all the text and stuff in the div is still hidden.

If you check here I no longer have it reset the position of the div tag and everything works except it holds the area that the div held.
http://felix2000.myftp.org/test/test2.html

Any help figuring this one out is much appreciated.

-=[ Felix ]=-

0
Comment
Question by:Felix2000
[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
3 Comments
 
LVL 36

Assisted Solution

by:Zyloch
Zyloch earned 75 total points
ID: 12152457
Hi Felix2000,

This is actually an IE only problem. Use display instead of visiblity:

function hidediv( divid )
{
    divtag = document.getElementById( divid );
    if ( divtag.style.display == 'none')
        {

            divtag.style.display = '';
        } else {
            divtag.style.display = '';
        }
}

Regards,
Zyloch
0
 
LVL 13

Accepted Solution

by:
StormyWaters earned 25 total points
ID: 12152459
use display:none and display:block instead of visibility.
And it works fine the way it is in Firefox, but is buggy (What a suprise!!) in IE.
0
 
LVL 3

Author Comment

by:Felix2000
ID: 12152471
Argh!!! I was even on the right track playing with that display, but I didn't take out the position crap.
Thanks both!
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone 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

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

756 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