Solved

frame menu

Posted on 1997-03-25
3
193 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Error viewing ASP page 12 163
Where can I find... 1 32
Website Interactive tool that will do calculations 3 53
How to call weather service by using asmx? 4 30
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

773 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