Accessing Elements in other frames

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Evan

    #1

    Accessing Elements in other frames

    Firstly, I am aware of all the issues that are introduced with frame
    pages - this was not my decision - it is just what I have to work
    with...

    I have a frame page that looks like this
    -------------------
    | topFrame |
    -------------------
    | navFrame |
    -------------------
    | ContentsFrame |
    |------------------

    Within the contents frame I have a NEW FRAME set which looks like this
    --------------------
    | | |
    |treeFrm | frmDisp |
    | | |
    --------------------

    I know that this is awful. I have a link in the contentsFrame. When I
    move over that link, I need to get a layer that already exists in the
    frmDisplay to become visible... PLEASE HELP ME... I have NO idea how
    to do this... even more so because I am not sure that it can even be
    done :(

    Evan
  • kaeli

    #2
    Re: Accessing Elements in other frames

    In article <53203c78.04101 22356.68cc8a7b@ posting.google. com>,
    evandelagrammat icas@hotmail.co m enlightened us with...[color=blue]
    >
    > I know that this is awful. I have a link in the contentsFrame. When I
    > move over that link, I need to get a layer that already exists in the
    > frmDisplay to become visible... PLEASE HELP ME... I have NO idea how
    > to do this... even more so because I am not sure that it can even be
    > done :([/color]

    top.frames['myFrameName'].document.getEl ementById
    ("elementId").s tyle.visibility = visible;

    There should be numerous checks in production code to make sure the objects
    and properties exist.
    Also, this assumes the frameset is not in someone else's frameset. ("top")

    HTH


    --
    --
    ~kaeli~
    You feel stuck with your debt if you can't budge it.



    Comment

    Working...