Results 1 to 2 of 2

Thread: Hiding element

  1. #1

    Thread Starter
    Evil Genius alex_read's Avatar
    Join Date
    May 2000
    Location
    Espoo, Finland
    Posts
    5,538

    Hiding element

    Hi all !
    Can any web gurus out there tell me the netscape equivalent of these IE javascript functions to hide & show an element please?

    Code:
    function ShowMenuDiv(divID)
    {
    	document.all.divMenu1.style.display = "";
    }
    
    function HideMenuDiv(divID)
    {
    	document.all.divMenu1.style.display = "none";
    }

    Please rate this post if it was useful for you!
    Please try to search before creating a new post,
    Please format code using [ code ][ /code ], and
    Post sample code, error details & problem details

  2. #2
    Fanatic Member punkpie_uk's Avatar
    Join Date
    Sep 2001
    Location
    UK
    Posts
    645
    ns4 you mean?

    try...
    Code:
    document.layers[layerid].visibility='hide';
    document.layers[layerid].visibility='show';
    With ns4 you cant turn the entire display off, only hide the element.

    ns6 uses the w3c DOM.

    Code:
    document.getElementById(layerid).style.display='none';
    document.getElementById(layerid).style.display='block';
    SPREAD THE WORD!!! Are You Lee McCormick? Because I Am



    Lee M McCormick
    [email protected]

    Lee McCormick.com - Live
    Dynamically Webbed.com - In development but live

Posting Permissions

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



Click Here to Expand Forum to Full Width