View Full Version : [DHTML] Menu on top of frameset

09-23-2007, 11:24 PM
1) CODE TITLE: Menu on top of frameset

2) AUTHOR NAME/NOTES: Arie Molendijk

3) DESCRIPTION: Technique for showing an ordinary ('non-frameset') menu (or any layer for that matter) on top of the main frame of a frameset. If your navigation menu is very heavy (--> causing flicker on page transition), then you could use this technique. No specifications in the main frame pages required. Works also with 'foreign' pages.

4) URL TO CODE: http://molendijk.110mb.com/dynamic/

or, ATTACHED BELOW (see #3 in guidelines below):

10-11-2007, 10:03 PM
I only noticed this thread because you pointed it out as a possible solution to an old thread I had posted in (where I said the Chrome CSS Drop Down Menu wasn't designed to drop across frames). I haven't really looked over your method in detail yet, but from reading the page you linked to in your above post, and trying out the demo on it, it looks very nice!

When I get more time, I will investigate it further. Also of interest to me are your claims/ideas about overcoming other limitations of framesets.

In any case - Congratulations on getting 'Anylink' to drop across frames!

10-12-2007, 07:44 AM
You 'll notice that my coding is rather clumsy (I'm not an expert!), but I think the idea behind it is right.
Thanks for your comment.
(I added an ordinary div that shows in front of the frames).
Arie Molendijk.

10-15-2007, 03:39 PM
Menu over frames: I noticed that In certain non-IE browsers, the submenus won't always hide on mouseout. See explanations / workaround in the URL TO CODE-link above.

Arie Molendijk

10-16-2007, 08:45 PM
Question to jsscheuer1,
In an old post (see here (http://www.dynamicdrive.com/forums/showthread.php?t=8101&highlight=archives+frameset)), you explained how to force 'orphan pages' to appear within their frameset. You said that we have to put the following in the head of each pages:
<script type="text/javascript">
if (window == top) {
var url='window.location.replace("index.html?var1='+window.location.href+'")';
I tested it, and it works OK, even if we don't insert into the frameset page the scripts you gave for that page. Why do we need those other scripts?
Thanks in advance,
Arie Molendijk.

10-16-2007, 09:09 PM
Without the additional code, the frameset won't know which page to load into its frame. If all you want is the default frameset, you don't need any of the other code.

10-16-2007, 09:41 PM
OK, I see. Thanks for the prompt reply.

10-18-2007, 03:50 PM
Added some coding for help with bookmarking the framed pages and for not allowing framed pages to appear as 'orphans' (= without the frameset) + some other stuff. see sources of the files (ZIP included).

Arie M.

10-22-2007, 01:38 PM
Hitting the bookmark button / the print button / the correct URL button produces a specific message now if the main frame's page is external.
(Doesn't always function correctly; probably a minor problem. I will come back to this as soon as I have time).

Arie M.

10-23-2007, 02:39 PM
Problem signalled above has been corrected.
Arie M.

10-24-2007, 03:10 PM
Site updated oct. 24th, oct. 25th.
Bookmark button displays name of main frame's page now (if page is not external).
Buttons for bookmarking / printing / correcting URL hide when viewer sees an external page in the main frame.

Arie M.

10-26-2007, 01:08 PM
Site updated oct. 26th.
The bookmark button and the bookmark alert are OK now (I had problems with that in preceding versions of the site).

Arie M.

10-27-2007, 11:56 PM
Site updated oct. 28th, 29th.
All functions and other 'activities' are in index.html now, except for the script that must be put in all frameset's pages in order for the enframed pages to show within their frameset. Also, some onload- and onunload instructions must remain part of the main frame's pages ('page1.htm' and 'page2.html').
The fact that almost everything can be controlled in 'index.html' makes it very easy to maintain the site.

Arie M.

10-30-2007, 11:23 PM
Site updated oct. 31th., nov.2nd.
More info and how-to's added.

Arie M.

11-29-2007, 10:47 PM
The technique used for this site has also been applied here (http://www.let.rug.nl/~molendyk/twinhelix_cascade_across_frames/).
Apparently, the issue on how to have the menu(s) on top of the frameset depends on the nature of the menu: listmenu or simple anchor menu (Anylink) vs purely javascript (Twinhelix Cascading Menu). In the latter case, loading a file in the main frame requires 'parent.ifr.main' as the goal of the link ('ifr' being the name of the fulscreen iframe that loads the frameset).

Arie M.

12-06-2007, 02:46 PM
I am unable to access the link that you have posted above to see the code that you are using to cross frames with your menus. I really need to figure out how to do this with the tool tip that I am using at http://www.4x4riders.us/index-frames.html .

I don't really know anything about javescript at this time and I am trying to get this site finished so that I can take the time to start reasing and learning Javascript.

Any help would greatly be appreciated.


12-06-2007, 03:23 PM
Hello gknight,
The server is down at the moment. Here's another address for the site:

12-06-2007, 04:58 PM
Make something like this and you'll see what I mean:


<body style="overflow:hidden;margin:0;padding:0">

<iframe src="index-frames.html" style="position:absolulte;left:0;top:0;width:100%;height:100%;width:100%" frameborder="0">
<div style="position:absolute; left:20px; top:100px; width:300px; height:75px; background:#dedede;border:2px dashed red">This could be your tooltip</div>



Arie Molendijk.

03-31-2011, 03:42 PM
Hey Arie - Thanks! I never needed to do this before and banged my head trying to find a solution. I have to pull an external page into a frameset but need some complex navigation that I could control. This is brilliant.

Do you think that this is still the best way when forced to use a frameset?


03-31-2011, 08:13 PM
Do you think that this is still the best way when forced to use a frameset?
It would be better not to use framesets at all. But there are cases in which it seems hard to do without them. In those cases, I think that this is the best way indeed to do it: a dynamic frameset included in a iframe.