problems with hide / show

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

  1. Mel

    Mel Guest

    I have a table with two TDs (LHS & RHS), each TD contains a frame full
    of stuff.

    on one of the frames (RHS) I have an icon with onClick attached to
    show/hide LHS.

    My code goes like this:

    parent.document.getElementById('LHS').style.display='none';

    when I click on the icon i get a message ACCESS DENIED!

    can someone shed some light on this ?

    thanks
     
    Mel, Apr 17, 2007
    #1
    1. Advertising

  2. Mel

    Yansky Guest

    On Apr 18, 5:40 am, Mel <> wrote:
    > I have a table with two TDs (LHS & RHS), each TD contains a frame full
    > of stuff.
    >
    > on one of the frames (RHS) I have an icon with onClick attached to
    > show/hide LHS.
    >
    > My code goes like this:
    >
    > parent.document.getElementById('LHS').style.display='none';
    >
    > when I click on the icon i get a message ACCESS DENIED!
    >
    > can someone shed some light on this ?
    >
    > thanks


    Is there a reason you're trying to access the parent node of the
    document? If you just want to hide the element with an id of LHS, then
    just use document.getElementById('LHS').style.display='none';
     
    Yansky, Apr 17, 2007
    #2
    1. Advertising

  3. Mel

    Yansky Guest

    On Apr 18, 5:40 am, Mel <> wrote:
    > I have a table with two TDs (LHS & RHS), each TD contains a frame full
    > of stuff.
    >
    > on one of the frames (RHS) I have an icon with onClick attached to
    > show/hide LHS.
    >
    > My code goes like this:
    >
    > parent.document.getElementById('LHS').style.display='none';
    >
    > when I click on the icon i get a message ACCESS DENIED!
    >
    > can someone shed some light on this ?
    >
    > thanks


    Ah right, I see what you're getting at. Try window.top to get out of
    the frame. http://developer.mozilla.org/en/docs/DOM:window.top
     
    Yansky, Apr 17, 2007
    #3
    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. Jerad Rose

    Dynamically Show/Hide Groups of TR's

    Jerad Rose, Jun 24, 2003, in forum: ASP .Net
    Replies:
    12
    Views:
    11,654
    intrader
    Jul 10, 2005
  2. =?Utf-8?B?bWlrZWU=?=

    Cursor wait, hide or show

    =?Utf-8?B?bWlrZWU=?=, Dec 12, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    752
    Alex Papadimoulis
    Dec 12, 2003
  3. Replies:
    1
    Views:
    1,752
    Neredbojias
    Oct 17, 2007
  4. Replies:
    2
    Views:
    191
  5. ll
    Replies:
    2
    Views:
    685
    Thomas 'PointedEars' Lahn
    May 1, 2008
Loading...

Share This Page