Reply to Re: Can iframe hide itself?

Your name:

Reply:


Posted by Noozer on 05/26/05 00:06

"Noozer" <dont.spam@me.here> wrote in message
news:Jp5le.1482139$8l.1466726@pd7tw1no...
> "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?

ARGH! IFRAMEs don't have a style object...

Put the IFRAME within a SPAN and I have no problems making the SPAN
disappear.

[Back to original 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

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