Solved

frame menu

Posted on 1997-03-25
3
206 Views
Last Modified: 2013-12-25
In my main file, I open a window menu with Javascript (window.open command). This new window menu contains several links which should load different documents to the "parent" URL. I have tried to refer to the parent document as "parent", or "top", but it won't work. Tell me how can I refer to the caller-parent document from the window opened in Javascript?
0
Comment
Question by:apero
3 Comments
 
LVL 1

Expert Comment

by:Michel021497
ID: 1854017
You must give eeach frame a name. For example:
<FRAME SRC=main.html NAME=main>

When you want a document to load in main.html, you can use TARGET=main.

FOR EXAMPLE <A HREF=doc1.html TARGET=main>Document 1</A>

This loads doc1.html in the frame where main.html was loaded.
0
 

Author Comment

by:apero
ID: 1854018
THere are noframes whatsoever,
If there were frames,
I would have no problems with it, but there AREN'T
I just want to control a non-framed document
from a flying menu, which is opened from the current
 docume.Any other suggestions?
0
 
LVL 4

Accepted Solution

by:
jshamlin earned 50 total points
ID: 1854019
HTML "TARGET" syntax addresses defines frames named in the HTML <FRAMESET> - since the new window was defined by Javascript, the window's name is not available to HTML "TARGET" values.

And so, you can *only* access the window by name in JavaScript.  This can most cleanly be done using document.open, thus:

   window_name.document.open("text/html","replace")

If I'm reading you right - you've created a child window from the main browser window, so the main browser window isn't explicitly named.  No problem - it's the parent - so use ...

   parent.document.open("text/html","replace")
0

Featured Post

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!

Question has a verified solution.

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

Suggested Solutions

Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

685 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