PDA

View Full Version : Cascading Menu Using IFrames



jacobson
10-07-2004, 04:10 AM
I am trying to create a web page that will have several columns in a table. Each of the columns (except the last) will contain an IFrame into which I will load a list of links. The last column will contain an IFrame into which I will load some text. The user interaction should be:

+ Click on link in IFrame1, which causes a list of links to load in IFrame2.
+ Click on link in IFrame2, which causes a list of links to load in IFrame3.
+ Click on link in IFrame3 to show text in IFrame4.

I know how to change the "src" property of an IFrame to change the page that is shown in the IFrame, but I find that I cannot refer to IFrame2 from IFrame1 because IFrame1 knows nothing about the existence of IFrame2, and so on for IFrame3 and IFrame4.

Is there a way to make each IFrame aware of the other IFrames so that Javascript in the pages loaded into each IFrame can refer to the other IFrames on the main page? Or, is there another way to implement the same cascading menu effect (i.e., clicking on links from left to right to drill down a tree of links to get to some content)?

Thanks. HAJ