469,915 Members | 2,709 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,915 developers. It's quick & easy.

Setting a <div> visibility in a parent window from an iframe

Hi

I have a page containing a hidden <div> called 'controls' plus an <iframe>
containing a second page. I need to be able to set the visibility of the
'controls' div when the page in the iframe loads. Is this possible?

Using this code I can change the visibility from a link in the parent
window:

onClick="document.getElementById('controls').style .visibility='visible'"

but if I try something like

parent.getElementById('controls').style.visibility ='visible'

It just replaces the parent with the page from the iframe.

Cheers
Mickey
Jul 23 '05 #1
1 6196
Micky Pearce wrote:
Hi

I have a page containing a hidden <div> called 'controls' plus an <iframe>
containing a second page. I need to be able to set the visibility of the
'controls' div when the page in the iframe loads. Is this possible?

Using this code I can change the visibility from a link in the parent
window:

onClick="document.getElementById('controls').style .visibility='visible'"

but if I try something like

parent.getElementById('controls').style.visibility ='visible'
parent.document.getElementById('controls').style.v isibility='visible'

Mick

It just replaces the parent with the page from the iframe.

Cheers
Mickey

Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by O.J. Tibi | last post: by
19 posts views Thread by benzwt | last post: by
2 posts views Thread by Ruskin Hardie | last post: by
7 posts views Thread by News | last post: by
2 posts views Thread by Richard Maher | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.