Solved

frame menu

Posted on 1997-03-25
3
210 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
[X]
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
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

Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
When the s#!t hits the fan, you don’t have time to look up who’s on call, draft emails, call collaborators, or send text messages. An instant chat window is definitely the way to go, especially one like HipChat. HipChat is a true business app. An…
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
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.

734 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