ref from one frame to another w/in frameset

Discussion in 'Javascript' started by Frances Del Rio, Jul 6, 2004.

  1. 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
     
    Frances Del Rio, Jul 6, 2004
    #1
    1. Advertising

  2. Frances Del Rio

    kaeli Guest

    In article <>, 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
     
    kaeli, Jul 7, 2004
    #2
    1. Advertising

  3. 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 <> wrote in message news:<>...
    > 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
     
    Frances Del Rio, Jul 7, 2004
    #3
  4. 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 <>, 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.
    >
     
    Frances Del Rio, Jul 7, 2004
    #4
  5. Frances Del Rio

    kaeli Guest

    In article <>, 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
     
    kaeli, Jul 7, 2004
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    365
  2. Replies:
    22
    Views:
    796
    peter koch
    Apr 30, 2008
  3. Replies:
    6
    Views:
    379
    James Kanze
    Apr 29, 2008
  4. Navindra Umanee

    strong ref from weak ref?

    Navindra Umanee, Feb 12, 2005, in forum: Ruby
    Replies:
    2
    Views:
    160
    Navindra Umanee
    Feb 12, 2005
  5. Julius Mong
    Replies:
    1
    Views:
    392
    Randy Webb
    May 10, 2004
Loading...

Share This Page