Results 1 to 5 of 5

Thread: Change Visibility

  1. #1
    Join Date
    Sep 2006
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Change Visibility

    Hi,

    I just started learning JavaScript and i'm having some difficulties.

    And I think this is a easy problem. But I can't find the solution...

    I put a layer in my document with the visibility style "hidden".

    And when i call a function i want to make this visible... How will i do?
    I tried this

    Code:
    function show(){
    	
    document.menu.style.visibility = "visible"
    
    }
    but it didn't work...

    HELP ME!

  2. #2
    Join Date
    Sep 2006
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    more...

    I'd like to make that frame visible.

    Code:
    <div id="layer" style="position:absolute; left:31px; top:86px; width:159px; height:243px; z-index:1;">
    	<iframe name="menu" src="menu.html" width=159 height=243 style="visibility:hidden "></iframe>
    </div>

  3. #3
    Join Date
    Aug 2006
    Posts
    239
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Code:
    function show(){
    	
    document.getElementById('menu').style.visibility = "visible"
    
    }
    Furthermore, I don't think you can do that with iframe (if it works, huzzah for you ), yet try other property: display: block|none

  4. #4
    Join Date
    Sep 2006
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Cool!!

    Thanks a lot! It works perfectly!

    Now I just need to work with "If... else".

    Thanks man!

    And sorry for my english. I'm a brazilian guy with a poor english... =D

  5. #5
    Join Date
    Aug 2006
    Posts
    239
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by ZeusEX
    And sorry for my english. I'm a brazilian guy with a poor english... =D
    Nothing to be ashamed of, you write very well in English.

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
  •