Solved

frame menu

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

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.
"In order to have an organized way for empathy mapping, we rely on a psychological model and trying to model it in a simple way, so we will split the board to three section for each persona and a scenario and try to see what those personas would Do,…
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

744 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

10 Experts available now in Live!

Get 1:1 Help Now