How can I access and element in the Top Window from Inside an Iframe

Discussion in 'Javascript' started by Mel, Apr 18, 2007.

  1. Mel

    Mel Guest

    I need to access an element of my top window from inside an IFrame
    within that window.

    I tried:
    parent.MYFRAME.document.getElementById("LHS");

    and i get a "Access Denied"

    is there a way to do this ?

    thanks in advance
     
    Mel, Apr 18, 2007
    #1
    1. Advertising

  2. Mel

    Yansky Guest

    On Apr 18, 10:30 am, Mel <> wrote:
    > I need to access an element of my top window from inside an IFrame
    > within that window.
    >
    > I tried:
    > parent.MYFRAME.document.getElementById("LHS");
    >
    > and i get a "Access Denied"
    >
    > is there a way to do this ?
    >
    > thanks in advance


    If the iframe src from the same domain as the parent document?

    There's a new jQuery plugin that was just released yesterday that
    might help you: http://groups.google.com/group/jquery-en/browse_thread/thread/e1b2c367f354aead/
     
    Yansky, Apr 18, 2007
    #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. find clausen

    window.opener.top.location.top.close ???

    find clausen, Oct 5, 2003, in forum: Javascript
    Replies:
    2
    Views:
    451
    find clausen
    Oct 5, 2003
  2. Daedalous
    Replies:
    3
    Views:
    788
    Daedalous
    Jan 16, 2004
  3. nc
    Replies:
    0
    Views:
    171
  4. Replies:
    3
    Views:
    106
  5. Mel
    Replies:
    4
    Views:
    89
    wisestpotato
    Apr 19, 2007
Loading...

Share This Page