471,310 Members | 1,615 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,310 software developers and data experts.

ref from one frame to another w/in frameset

sorry, but need to post entire frameset here to ask my question:

<frameset rows="79,344,107">
<frame name="header" src="header.html">
<frame name="player" src="mediaselect.html">

<frameset cols="353,*">
<frame name="left" src="left.html">
<frame name="right" src="right.html">
</frameset>
</frameset>

I need to ref. from within right.html to mediaselect.html... (i.e.,
from frame name "right" to frame name "player"..) I need to say if
such-and-such a url is loaded into frame named "player" then do
such-and-such... I tried:

-- parent.frames.player.location // and
-- parent.parent.frames.player.location

I haven't done JS w/frames in a while, so I forget exactly how you ref.
to another frame in frameset when you're dealing in nested framesets..
thank you...

Frances Del Rio

Jul 23 '05 #1
4 1556
just wanted to say (sorry, posted this last night, was tired) that I
get errors that say "parent.frames.player.location" or whatever I try
is "not an object.." thank you.. Frances

Frances Del Rio <fd***@yahoo.com> wrote in message news:<2l************@uni-berlin.de>...
sorry, but need to post entire frameset here to ask my question:

<frameset rows="79,344,107">
<frame name="header" src="header.html">
<frame name="player" src="mediaselect.html">

<frameset cols="353,*">
<frame name="left" src="left.html">
<frame name="right" src="right.html">
</frameset>
</frameset>

I need to ref. from within right.html to mediaselect.html... (i.e.,
from frame name "right" to frame name "player"..) I need to say if
such-and-such a url is loaded into frame named "player" then do
such-and-such... I tried:

-- parent.frames.player.location // and
-- parent.parent.frames.player.location

I haven't done JS w/frames in a while, so I forget exactly how you ref.
to another frame in frameset when you're dealing in nested framesets..
thank you...

Frances Del Rio

Jul 23 '05 #2
In article <2l************@uni-berlin.de>, fd***@yahoo.com enlightened
us with...
sorry, but need to post entire frameset here to ask my question:

<frameset rows="79,344,107">
<frame name="header" src="header.html">
<frame name="player" src="mediaselect.html">

<frameset cols="353,*">
<frame name="left" src="left.html">
<frame name="right" src="right.html">
</frameset>
</frameset>

I need to ref. from within right.html to mediaselect.html...


If you don't need to worry about being in someone else's frameset, you
can use

top.frames['player'].location.href;

to get the string representation of the URL. [1]
Otherwise, I *think* you can use

self.parent.parent.frames['player'].location.href;

but I haven't played with nested framesets in a long time.

I believe that if the frame has loaded content outside your domain, this
will fail as a security violation.

[1] IIRC, using just window.location returns a Location object, not a
string.

--
--
~kaeli~
Hey, if you got it flaunt it! If you don't stare at someone
who does. Just don't lick the TV screen, it leaves streaks.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #3

thank you..

now it's saying that this stmt is missing a ")" ....
if (self.parent.parent.frames['player'].location.href; == 'wmp.html') {

if I do
if (document.all) {
it's fine, but if I do above stmt it says I'm missing a ")"... ?????

also, what's the difference betw.
if (whatever.location == 'page.html') // and
if (whatever.location.href == 'page.html')

thank you.. Frances
kaeli wrote:
In article <2l************@uni-berlin.de>, fd***@yahoo.com enlightened
us with...
sorry, but need to post entire frameset here to ask my question:

<frameset rows="79,344,107">
<frame name="header" src="header.html">
<frame name="player" src="mediaselect.html">

<frameset cols="353,*">
<frame name="left" src="left.html">
<frame name="right" src="right.html">
</frameset>
</frameset>

I need to ref. from within right.html to mediaselect.html...

If you don't need to worry about being in someone else's frameset, you
can use

top.frames['player'].location.href;

to get the string representation of the URL. [1]
Otherwise, I *think* you can use

self.parent.parent.frames['player'].location.href;

but I haven't played with nested framesets in a long time.

I believe that if the frame has loaded content outside your domain, this
will fail as a security violation.

[1] IIRC, using just window.location returns a Location object, not a
string.


Jul 23 '05 #4
In article <2l************@uni-berlin.de>, fd***@yahoo.com enlightened
us with...

thank you..

now it's saying that this stmt is missing a ")" ....
if (self.parent.parent.frames['player'].location.href;


Um, get the semi colon out of there if it's part of an if statement. :)
if (self.parent.parent.frames['player'].location.href == 'wmp.html') {

--
--
~kaeli~
The man who fell into an upholstery machine is fully
recovered.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by RichardM | last post: by
24 posts views Thread by Charles Crume | last post: by
3 posts views Thread by Robert | last post: by
5 posts views Thread by Frame | last post: by
4 posts views Thread by Andy Fish | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.