Solved

can't write into frame

Posted on 2004-10-03
9
149 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
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 250 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
jquery validation by class 12 52
query of query sort 6 97
Using YubiKey with REST API application 2 106
WCAG audit tools 1 72
When you work with shopping cart / ecommerce relates web sites, you need to pass the certain form post details to the payment gateway process page with required details for the products items you give to order. Also you may need to track the ordered…
It's sometimes a bit tricky to use date functions in Oracle BPEL. I'll explain quickly how you can add N days to the current date. In a BPEL process this can be useful, and you can adapt it to fit your needs. First of all, let's see how to add 1 …
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

932 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now