Change layer visibility between two frames

admin

Administrator
Staff member
Hi,

I have two framesets:


index.htm
|
----------------------
| |
index_nav.htm index_main.htm
(index_nav) (index_main)
Call to hidden layers |
|
-----------------
| |
nav.htm main.htm
(nav) (main)
hidden layers


The frame names are in brackets underneath the document names.

If I put the following javascript in index_nav.htm,
var doCheck = (top.parent.main.document.all!=null);

I get
"Error: 'top.parent.main.document' is null or not an object".

If I put a call to the hidden layers within the same frameset (nav.htm), I don't get any errors, i.e.,
var doCheck = (parent.main.document.all!=null);


Can anyone help? I seem to have tried every combination; parent.parent..., parent.frames[1]... and still keep getting errors.
 
Back
Top