ref from one frame to another w/in frameset

  • Thread starter Frances Del Rio
  • Start date
F

Frances Del Rio

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
 
K

kaeli

[email protected] enlightened said:
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
 
F

Frances Del Rio

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
 
F

Frances Del Rio

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

[email protected] enlightened said:
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.
 
K

kaeli

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,008
Latest member
HaroldDark

Latest Threads

Top