Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with Parent Frames....

Status
Not open for further replies.

dcusick

Technical User
Aug 9, 2000
271
US
I have a page that has three frames, labeled Top, Left, and Bottom.&nbsp;&nbsp;The layout is shown below...<br>&nbsp;______________<br>¦&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;¦ Top&nbsp;&nbsp;&nbsp;&nbsp;¦<br>¦&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;¦________¦<br>¦Left ¦&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;¦<br>¦&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;¦ Bottom ¦<br>¦_____¦________¦<br><br>When a button is clicked in the &quot;left&quot; frame, it pops up a window and asks for a password.&nbsp;&nbsp;If the password is correct, done in Javascript, it should open up a page in the &quot;Bottom&quot; frame.&nbsp;&nbsp;The current code I have to open it is 'parent.opener.location.href = target'<br><br>Where target is a variable holding the name of the page.&nbsp;&nbsp;This command opens up the page in the &quot;Left&quot; frame, where it was originally called from.&nbsp;&nbsp;What syntax do I use to refer to the &quot;Bottom&quot; Frame when a popup box is opened from the &quot;Left&quot; Frame.&nbsp;&nbsp;Thanks in advance for your help.<br><br>Doug
 
I think you should use: self.opener.parent.BottomFrame.location.href=target<br>where &quot;BottomFrame&quot; is the name of the bottom frame (&lt;frame name=&quot;BottomFrame&quot; ....&gt;). <p>IvanP<br><a href=mailto:ip@thehyper.net>ip@thehyper.net</a><br><a href= > </a><br>
 
Thanks for the reply but unfortunately the code doesn't work.&nbsp;&nbsp;What normally happens is a popup window opens, a password is entered, then, if correct, the window closes and it opens the target html.&nbsp;&nbsp;When I put this code in, the popup window acknowledged the password, yet never closed itself down and the page didn't load up in the frame.&nbsp;&nbsp;Any other help is greatly appreciated.<br>
 
Strange -&nbsp;&nbsp;I made some quicktests and it should work. May be I could help better if I see the code of the frameset. <p>IvanP<br><a href=mailto:ip@thehyper.net>ip@thehyper.net</a><br><a href= > </a><br>
 
Thanks again for the response.&nbsp;&nbsp;Here is my main page code.<br><br>&lt;HTML&gt;<br>&lt;HEAD&gt;<br>&lt;TITLE&gt;&lt;/TITLE&gt;<br>&lt;/HEAD&gt;<br>&lt;FRAMESET cols=&quot;170, *&quot;&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;FRAME Name=&quot;Left&quot; src=&quot;LeftFrame-.html&quot;&gt;<br>&nbsp;&nbsp;&lt;FRAMESET rows=&quot;120, *&quot;&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;FRAME Name=&quot;Top&quot; src=&quot;TopFrame.html&quot;&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;FRAME Name=&quot;Bottom&quot; src=&quot;Bottom.html&quot;&gt;<br>&nbsp;&nbsp;&lt;/FRAMESET&gt;<br>&nbsp;&nbsp;&lt;NOFRAMES&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;P&gt;This frameset document contains:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;UL&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;LI&gt;&lt;A href=&quot;contents_of_frame1.html&quot;&gt;Some neat contents&lt;/A&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;LI&gt;&lt;IMG src=&quot;contents_of_frame2.gif&quot; alt=&quot;A neat image&quot;&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;LI&gt;&lt;A href=&quot;Outstanding Checks - Washington by AE#.html&quot;&gt;&lt;/A&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/UL&gt;<br>&nbsp;&nbsp;&lt;/NOFRAMES&gt;<br>&lt;/FRAMESET&gt;<br>&lt;/HTML&gt;<br>
 
Hi again.<br><br>This code should work:<br>self.opener.parent.Bottom.location.href=trget<br>(at least it worked by me)<br>note that I am using variable named &quot;trget&quot; instead &quot;target&quot; - with var name target I had also problems with the JS - obviously it is reserved. (Previously I tested direct with filename)<br><br>I hope that this helps. <p>IvanP<br><a href=mailto:ip@thehyper.net>ip@thehyper.net</a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top