Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-04-2003, 06:36 AM   PM User | #1
Tombo
New Coder

 
Join Date: Jun 2002
Location: Canada
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
Tombo is an unknown quantity at this point
Targeting frames in a new window w/ document.write

Hullo,

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?
__________________
Tombo out.
Tombo is offline   Reply With Quote
Old 04-04-2003, 01:32 PM   PM User | #2
chrismiceli
Regular Coder

 
Join Date: Sep 2002
Location: Louisiana
Posts: 576
Thanks: 0
Thanked 0 Times in 0 Posts
chrismiceli is an unknown quantity at this point
give the new window a name, like this
window.open("./home.html", "name", "options");
name.parent.frames[frame#].document.write();
__________________
DevEdge - MSDN - DevGuru
chrismiceli is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:59 AM.


Advertisement
Log in to turn off these ads.