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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parent window 2

Status
Not open for further replies.

dle46163

IS-IT--Management
Joined
Jul 9, 2004
Messages
81
Location
US
I had this working..then broke it somehow and can't figure out what's wrong!! I have a window with frames. A link in one of the frames creates a pop up window. The pop up window has a form. After the form is filled out and the submit is selected, I need to load a specific url in the frame named "left_frame" in the parent window. Here's what I have between my script tags:

window.parent.frames['left_frame'].document.location='

I've tried every variation I can think of...The error I get in IE says that left_frame is either null or doesn't exist. That can't be true because I can launch the popup from the left_frame and use window.opener.location and it works fine! Any help would be great!
 
if you're calling this code from your popup window, you'll likely need something like this:

Code:
opener.frames['left_frame'].location = '[URL unfurl="true"]http://www.somepage.com/';[/URL]



*cLFlaVA
----------------------------
[tt]( <P> <B>)13 * (<P> <.</B>)[/tt]

[URL unfurl="true"]http://www.coryarthus.com/[/url]
 
Thanks for the reply...I tried the code you supplied and it barfs too. Same error.
 
<a href="#" class="media_link" style="text-decoration: none" Onclick=window.open('media_schedule_popup.php','Copy','scrollbars=0,resizable=no,width=525,height=500,left=320,top=150'); return false";> Add Schedule</a>


There are also some variables I pass through the url that I didn't include here.
 
sorry for the delay... here's the script in my popup:

<SCRIPT language='JavaScript'>
<!--
opener.frame['left_frame'].location='self.close();
//-->
</script>

The rest of the page is a rather large php script. Not sure if maybe something else is causing a problem..the strange thing is this works --> window.opener.location.href=' ...it just doesn't load in the correct frame.
 
"opener.frame" should be "opener.frames"... but for you, simply "opener.locatation = " should suffice, as you say you want to set the location of the opening frame.

Hope this helps,
Dan



[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
I tired that and it didn't work for me either...oddly enough just now I put this in and it did work!! So I guess between all of us the problem is solved! Thanks so much.


opener.parent.frames['left_frame'].location='
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top