?
Solved

can't write into frame

Posted on 2004-10-03
9
Medium Priority
?
155 Views
Last Modified: 2010-07-27
I open a web page containing two frames - the frame  names are "top" and "bottom".

From the page in the "top" frame, I open a new dialog (using javascript window.open). The user clicks on a button in that  dialog, and I want to open a page in the "bottom" frame of the original window.

I've tried my usual  -  parent.frames['bottom'].document.location = "the url I want to display in the frame".

But this didn't work.


Maybe window.open creates another parent?

In any case, can anyone tell me how to aim a URL at that bottom frame?


0
Comment
Question by:rfr1tz
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 36

Expert Comment

by:Zyloch
ID: 12213186
Hi rfr1tz,

Yes, you would do parent.parent.frames['bottom'].location.href="theurl.html";

Regards,
Zyloch
0
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 1000 total points
ID: 12213196
I think:
opener.top.frames['bottom'].location.href="theurl.html";

Cd&
0
 
LVL 36

Expert Comment

by:Zyloch
ID: 12213202
Oops, that's my bad. Cd, you're right ;)

Regards...
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 12213203
And if that fails it is because you have named your frame using the reserved property name top.  Probably a good idea to change it no matter what you do, because sooner or later it will jump up and bite you.

Cd&
0
 
LVL 3

Author Comment

by:rfr1tz
ID: 12222521
Good point Dino. But actually I didn't name it 'bottom' - that was just for illustration.
0
 
LVL 18

Expert Comment

by:arantius
ID: 12241438
Actually the reserved name is _top, with the underscore, is it not ?
0
 
LVL 36

Expert Comment

by:Zyloch
ID: 12242360
It seems to be like that in links, like _self, for example, but if look at any frame breaking code in Javascript:

top.location=self.location

Apparently, in Javascript, you take away the underscore. In any case, Cd's frames[] array part should fix it fine and dandy
0

Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to dynamically set the form action using jQuery.
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question