problems with hide / show

M

Mel

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
 
Y

Yansky

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';
 
Y

Yansky

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top