navigating to a target frame using javascript

Discussion in 'Javascript' started by rbowie@hotmail.com, Mar 30, 2005.

  1. Guest

    Hi there

    im tryin to nav to a frame using javascript.

    I have a frameset within a frameset. I want to be able to navigate from
    the inner most frameset to an outer frame.

    So frame i have only managed to nav to a frame within the current
    framset using the following code:

    parent.frames['0'].location.href="myPage.asp";

    I've used the alert box to display all the frames within the frameset
    and the frames displayed are only the frames in the inner most
    frameset.

    How do you reference the outer most frames.

    Thanks in advance.
    Bob.
    , Mar 30, 2005
    #1
    1. Advertising

  2. Csaba Gabor Guest

    Try parent.parent.frames[0]...
    To get to the outermost frame you could also do: top.frames[0]

    wrote:
    > Hi there
    >
    > im tryin to nav to a frame using javascript.
    >
    > I have a frameset within a frameset. I want to be able to navigate from
    > the inner most frameset to an outer frame.
    >
    > So frame i have only managed to nav to a frame within the current
    > framset using the following code:
    >
    > parent.frames['0'].location.href="myPage.asp";
    >
    > I've used the alert box to display all the frames within the frameset
    > and the frames displayed are only the frames in the inner most
    > frameset.
    >
    > How do you reference the outer most frames.
    >
    > Thanks in advance.
    > Bob.
    >
    Csaba Gabor, Mar 30, 2005
    #2
    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. TheKeith
    Replies:
    20
    Views:
    3,270
    qc832
    Jun 26, 2003
  2. Tom Jones

    Navigating *away* from a frame

    Tom Jones, Dec 18, 2004, in forum: HTML
    Replies:
    3
    Views:
    494
    Starshine Moonbeam
    Dec 19, 2004
  3. Replies:
    2
    Views:
    189
  4. target frame javascript

    , Aug 7, 2006, in forum: Javascript
    Replies:
    0
    Views:
    89
  5. Phlip
    Replies:
    13
    Views:
    178
    Phlip
    Dec 17, 2006
Loading...

Share This Page