| Posted by Noozer on 05/25/05 23:41 
"Travis Newbury" <TravisNewbury@hotmail.com> wrote in messagenews: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] |