Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cascade menu across frames? 1

Status
Not open for further replies.

jacktripper

Programmer
Dec 5, 2001
124
US

Being pressured to get something done quickly, I've built a menu system in which the main menu nav bar in the top frame will cause "cascading menu" DIV layers to appear (via javascript) in the bottom frame under it.... So, it looks like your average cascading menu, but its not because the main menu bar and sub-menus are in entirely different files and frames. Works great... but...

The problem with this is that I have to include the submenu code in all my main content frames.

Does anyone know of any way at all for one frame to simply "overlay" or stretch over another frame? Do IFrames have this ability?

A little background, though: This is not new development, but rather trying to incorporate a ton (thousands) of "old content pages" into a new portal w/ new menu system that is designed around frames. I'm trying my best to avoid going through those 1,000+ html pages and individually adding the submenu include file reference to each one. So, if there is some magical way for frames to overlap somehow, and I've been kept out of the loop... It could save eons of time.

Any thoughts? Ideas? Suggestions?

Thanks in advance.
 
You can target a frameset's frame from outside of the frameset. So one option is to simply open your sub-menu in a javascript window that opens over the frameset.

Alternatively, make the sub-menu be its own page that opens in the bottom frame. Upon selecting the sub-menu option open the chosen window in the same bottom frame.

Clive
 
I guess I'm not following you here... :\ I am targeting another frameset currently. In frame-1 the javascript makes DIVs in frame-2 be visible/hidden according. And vise versa.

When you say "javascript window that opens over the frameset", do you mean another browser window (IE or FireFox). Or do you mean the main page that has all the <frameset> tags could also contain another some other tag (DIV?) that would open on top of the frames? I had the impression frame pages could only contain frames and nothing else.

On your alternative section, I need to make the cascading submenus appear semi-transparent over the existing main content. So, not following you there either.

Maybe you can be more descriptive for this idiot (me) :)

Thanks for replying.
 
Hi,

Yes I did mean another browser window although without menu, address bar and such.

Option 2 would replace the main content with the sub menu.

If neither of these are acceptable then you might want to re-think your whole approach and keep all navigation in the top frame and enlarge the top frame dynamically to accomodate the sub-menu items when needed.

See faq216-5703 for this approach.

Clive
 
Thanks for the clarification. The resizing of frames might be an option. The window pop would and replacing the main content would not... But, this was my suspicion to begin with. I think I'm screwed, and stuck spending days putting an js include into thousands of html pages (FYI this is a sales demo meant to work offline, so no asp or php or anything dynamic... hence, so many html pages).

But, I appreciate the link to resize frames. Thats something I didn't know was possible.
 
Why not just scrap the frame idea altogether and use a different solution? Since you're already using javascript to power the navigation, why not just create the navigation w/in the page using javascript? That way it can be controlled from one js file (which it looks like you're going to have to do anyway) and you won't have to make changes to 1000s of pages when the navigation options change. You'll just change the js file that controls the navigation.

Is this a good solution? No. Would I ever use it? Probably not. However, given your circumstances, it's trading one bad idea for another bad idea. At least powering the navigation using javascript you're not stuck behind the limitations of frames.

-kaht

Lisa, if you don't like your job you don't strike. You just go in every day and do it really half-assed. That's the American way. - Homer Simpson
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top