Solved

Problem making DIV tags Visible and Hidden

Posted on 2004-09-25
3
951 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
3 Comments
 
LVL 36

Assisted Solution

by:Zyloch
Zyloch earned 75 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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…

771 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

10 Experts available now in Live!

Get 1:1 Help Now