PDA

View Full Version : Change Visibility



ZeusEX
09-15-2006, 07:16 PM
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... :( :confused:

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


function show(){

document.menu.style.visibility = "visible"

}

but it didn't work...

HELP ME!

ZeusEX
09-15-2006, 07:18 PM
more...

I'd like to make that frame visible.



<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>

ItsMeOnly
09-15-2006, 07:27 PM
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

ZeusEX
09-15-2006, 07:43 PM
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

ItsMeOnly
09-15-2006, 07:46 PM
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.