Solved

Problem making DIV tags Visible and Hidden

Posted on 2004-09-25
3
957 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
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…

724 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