can't write into frame

Posted on 2004-10-03
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 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 creates another parent?

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

Question by:rfr1tz
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
LVL 36

Expert Comment

ID: 12213186
Hi rfr1tz,

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

LVL 53

Accepted Solution

COBOLdinosaur earned 250 total points
ID: 12213196
I think:['bottom'].location.href="theurl.html";

LVL 36

Expert Comment

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

Technology Partners: 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

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.


Author Comment

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

Expert Comment

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

Expert Comment

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


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

Featured Post

Industry Leaders: 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!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
XSLT 5 50
Web Application Architecture 6 80
How to setup a password to enter my web page? 3 121
How to write an English digest paper 6 103
This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

733 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