SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2000
    Location
    Australia
    Posts
    67
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Netscape hide/show layer problem

    I am having problems in getting Netscape 6 to hide/show a layer (div section) using javascript.

    What I have been trying is

    function showme(blah) {
    if (is_msie) {
    obj = document.getElementById(you[blah].title);
    obj.style.visibility = "visible";
    };
    if (is_nav) {
    eval("document." + you[blah].title + ".visibility = 'visible'");
    };
    }

    though this just makes netscape complaining about document.layername having no properties.

    If you could please help me out here it would be good as this is realy puzzling me.

  2. #2
    We like music. weirdbeardmt's Avatar
    Join Date
    May 2001
    Location
    Channel Islands Girth: Footlong
    Posts
    5,882
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You don't need the ";" after the closing curly braces.
    I swear to drunk I'm not God.
    Matt's debating is not a crime
    Hint: Don't buy a stupid dwarf Clicky

  3. #3
    SitePoint Enthusiast spleenboy's Avatar
    Join Date
    Nov 2000
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What are you using for your is_msie and is_nav variables? You should use getElementbyId(), your first block of code, with Nav 6. The second block of code will only work with Nav 4. Perhaps you need to look at your browser check.
    s-p-l-e-e-n-d-i-f-e-r-o-u-s


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •