View Full Version : Sucker Tree menu with frames

09-21-2006, 04:31 PM
1) Script Title: Sucker Tree Vertical Menu

2) Script URL (on DD): http://www.dynamicdrive.com/style/csslibrary/item/suckertree-menu-vertical/

3) Describe problem:

I'm not a pro by any means, so please bear with me. I'm using this awesome bit of script to display a Policy and Procedure manual. Here's the scoop:

index.html contains "the css" portion of this script. The index.html file loads the header of the page, which contains a flash animation which also has navigation tabs. Below the header is a frame labelled as "cont". When you load the index.html, it pulls iframe_0.html into this frame. iframe_0.html is where "the html" portion of Sucker Tree is at.

When you fire up index.html, everything loads correctly and the menu works properly. If I navigate to another tab, (i.e. iframe_1.html) and then try to return to the main page (iframe_0.html), the frame loads correctly but only the first level of the Sucker Tree is displayed. From what I can gather, and this may or may not be correct, it is not executing buildsubmenus() properly when the frame is loaded.

There is a function in each iframe_*.html that is loaded by <body onload="load_content()">.

I've tried modifying this statement to read as <body onload="load_content(); buildsubmenus()"> to get it to load the rest of the Sucker Tree but the only change that occurs is the arrow(http://www.dynamicdrive.com/cssexamples/media/arrow-list.gif) will load but I still cannot navigate into sub menus.

I've tried putting the entire script into just the iframe_0.html but it will not load properly unless it is in index.html. Even if I have it in both files, it will not function once you've navigated away from the main page and then try to return to it.

How can I fix this?

Thanks in advance for your help, and thank you for such a wonderful script.

09-22-2006, 01:27 AM
Anyone have any suggestions? Need more information?

09-22-2006, 02:02 AM
A link to a demo page would help a lot

09-22-2006, 01:18 PM
Here you are:


09-23-2006, 07:18 PM


09-24-2006, 03:48 AM
I don't see the menu you are talking about? Is it the one with yellow highlights? Rereading your original post I see the problem. The CSS and the HTML must be in the same frame.

09-24-2006, 04:04 AM
That's the thing...I've tried that.

If I don't have the css and html in index.html (loads in the top most frame) the menu won't work at all. If I have it in iframe_0.html (the contents of the first tab, loads in the lower frame) it doesn't seem to make a difference.

Once you load the main page, mouse of the menu, it works great. Then click the Forms tab, then return to the Policy & Procedure tab. Try the menu, it doesn't work anymore.

09-24-2006, 12:44 PM
I'm having trouble checking the source of index_0.html everytime I visit it it redirects me back into the frameset.

09-24-2006, 12:57 PM
I saved the iframe_0 as a text document so you could view it.