menu and frames question

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
lpotter
Advanced
Advanced
Posts: 12
Joined: Mon Apr 18, 2005 5:42 pm

menu and frames question

Post by lpotter »

I tried to search the forums, and could not find a clear answer.

I have a vertical menu setup in the left frame of a two frame layout. The menu will not open up into the right frame, making it useless in the frame. Can this be configured to cross the frame boundry?

The menu is large and deep and takes a while to load. So I'm playing with frames so the menu gets loaded only once, not with every page change.
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Hi,

There is a solution. Essentially, you have a main menu in the navigation frame, but the submenus are displayed in the main frame. You can see a more detailed explanation of the approach and a working example, complete with downloadable source code, here.

Hope that helps,

Kevin
lpotter
Advanced
Advanced
Posts: 12
Joined: Mon Apr 18, 2005 5:42 pm

Post by lpotter »

thanks - looks like it should work, but most of my menu content lies in the submenus and they will be loaded in each page, meaning the menu data still has to load on every page load, so I don't think this solution will help me speed loading the page as I was trying to accomplish
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Is your menu_data in a .js file, or are you generating it wil server-side scripting? If it's just a plain ol' .js file, then it should be cached the first time the menu code is loaded, and loaded from the browser's cache (locally) each subsequent time. So, loading the menu code should not be taking a long time. Perhaps there's something else going on?

There's no other cross-frame solution. In a framed site, the content that can be displayed in a frame is limited to the content that is defined in the source file that's loaded into that frame. Menu or otherwise, no displayable content can straddle two frames.

Have you though about using the treemenu option? Since you have a vertical nav frame, you could load all of the menu code into the nav frame, and use a tree menu or collapsible menu, rather than a pop-out menu structure.

Cheers,

Kevin
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

I may be misunderstanding or be a bit confused here, but I think once the data file is read, it's in the cache and so it's not like it's getting a whole new file on each page, and having to 'read' and download the file again, it's already there. Or am I misunderstanding something here?

Ruth
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Hah! I did it to you that time Ruth! ;)

Check the time stamps... wow!

Kevin
lpotter
Advanced
Advanced
Posts: 12
Joined: Mon Apr 18, 2005 5:42 pm

Post by lpotter »

I don't think it's caching....

I removed the menu file includes from one of the content frame html pages. That page loads in a flash and the other pages that do load into the content frame menus are very slow.

So I think it does not cache the javascript files. at least it looks that way to me... and it's slow in both IE and Firefox.

The submenu javascript files are 220k in size.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Could we please have a url? It's hard to try and figure what the problem is if we can't get to the page where the problem is occurring. Thanks

Ruth
lpotter
Advanced
Advanced
Posts: 12
Joined: Mon Apr 18, 2005 5:42 pm

Post by lpotter »

Can I send you a private message with the url for my menu page? It's not a public page.

It's just a webpage of my music collection for my private use, so I can remember what I own. The top level is A-Z and this menu is loaded in the left side frame. There are 26 choices in the top level menu.

The next level is the artists for each letter and then below that is the individual albums. There is a total of 400 artists and below the artists is a total of 1600 albums. There are lots of menu definations... The menu js files are written from a C++ program I wrote to write the web page for me using data exported from my music jukebox program.

The pages take a long time to load even when loading from my local machine. Prior to this I was using a frame based tree menu and this was very fast to load, since the tree only loaded once in it's frame.

Now I think the Artist and Album menu's are loading on each page load.
Post Reply