View Full Version : Targeting frames in a new window w/ document.write

04-04-2003, 07:36 AM

If I'm using a script with the following line:

document.write ................ etc.

How do I tell it to target a specific frame within a new frameset within a new pop-up window.

In other words .................

Let's say I have a link:

<a href="home.htm" target="_new">home</a>

This link will open a new window w/ home.htm in it. Now what if home.htm was a frameset w/ 2 frames, "left" and "right".

How would I go about having that link write to a specific frame, (ie. like the "left" frame,) within that pop up window?

For example: the link uses document.write to write "Hello World." You click the link, it opens a new window containing a frame set w/ 2 frames, and the "left" frame says in it "Hello World."

What I've gathered thus far: if that link is within a frame in a frame set, and is to target another frame in the same frame set, the script is as follows:

parent.FRAME.document.write......................... etc.

where FRAME is the name of the frame.

Any help guys? :thumbsup:

04-04-2003, 02:32 PM
give the new window a name, like this
window.open("./home.html", "name", "options");