You are here: Re: Can iframe hide itself? « HTML « IT news, forums, messages
Re: Can iframe hide itself?

Posted by Noozer on 05/25/05 23:41

"Travis Newbury" <TravisNewbury@hotmail.com> wrote in message
news:1Z3le.11345$eR.9070@fe05.lga...
> Noozer wrote:
> > It's easy to make the frame visible as this code is included in the
parent
> > document, but the code to hide the IFRAME again will be in the IFRAME
> > document. How can the child IFRAME hide itself? Or, in other words, how
can
> > the child IFRAME reference the parent document to change it's style?

> parent.iframeID.style Using the right syntax of course.

Hrm.. For some reason it doesn't seem to work...

Iframe from the parent page:

<iframe src="subEdit.asp" name="EditFrame" id="EditFrame"
style="display:block;"></iframe>

....and this javascript from the iframe page will show the name "EditFrame":
alert (parent.EditFrame.name);

....but this javascript from the iframe page causes an error:
parent.EditFrame.style.display="none";

.... the error being "Parent.EditFrame.style is not an object"

*sigh* What am I doing wrong?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация