Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:48

Submenu with frames / inline frame ?


Poster: max matador
Dated: Tuesday November 14 2006 - 14:16:49 GMT

I’m using the frames version with the following frame setup (example 1):
TOP (header) frame – page with the main menu
MAIN (body) frame – page with the submenu – with only one line of regular text (nav status info) on top of the page and then an INLINE frame with the actual content.
The problem here is that the submenu won’t work with inline frame.

I therefore tried to change the frame setup to (example 2):
TOP frame – still the page with the main menu
STATUS frame (only about 15 pixels high) - frame/page with the submenu and the one line of text (nav status info) that used to be on top of the Main page in example 1.
MAIN (body) frame – now a regular frame with the actual content that used to be in the inline frame in example 1.
This results in the submenu getting more or less “invisible” or cropped since the frame height for the STATUS frame is only about 15 pixels. And yes, I do want the submenu to open vertically, not horizontally.

Is there a way to get around this?
I guess the easiest way would be to make the submenu work on pages with inline frames (as in example 1). The second alternative is to get the submenu to open in two or maybe even three different pages/frames at the same time, but with different top-offset values so the submenu appear as “one” (example 2). Using this method I could get rid of the inline frame and use regular frames instead.
I know I have the possibility to “jump over “ the STATUS frame in this example and set the submenu to the MAIN frame, however this is not a good solution from a graphical design point of view. In other words I still want the submenu to look “connected” to the main menu for graphical reasons, even if there’s a different frame in between the frame with the main menu and the frame with the sub menu.

Any suggestions how I can solve the problem?
What I basically want is to make the submenu work over multiple frames at the same time (example 2) or - even better - to work on the page with the inline frame (example 1).
Or maybe the submenu can open in a new layer or something that stays on top of the MAIN frame and is not being affected by the inline frame in the regular page layer? I know there must be a way…

Thanks in advance!
Max


Poster: Ruth
Dated: Wednesday November 15 2006 - 1:33:04 GMT

I'm not really sure I understand what you want.

In your menu download there is an extras folder and in it is a frames example. Using that as your sample do the following:

1. Copy the following code and save it as body-test.htm

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
   <title>Untitled</title>
   <style>
BODY{
   FONT-FAMILY:verdana;
   background-color:#FFFFFF;
   margin:0px;
}

.backG {
FONT-FAMILY:verdana;
background-color:#93c39b;
color:#ffffff;
border-bottom:#538c4d 2px solid;
font-size:120%;
}   
</style>

<script type="text/javascript" src="../../milonic_src.js"></script>
<script type="text/javascript">
if(ns4)_d.write("<scr"+"ipt type=text/javascript src=../../mmenuns4.js><\/scr"+"ipt>");
  else _d.write("<scr"+"ipt type=text/javascript src=../../mmenudom.js><\/scr"+"ipt>");
</script>

<!--
<script type="text/javascript" src="milonic_src.js"></script>
<script type="text/javascript">
if(ns4)_d.write("<scr"+"ipt type=text/javascript src=mmenuns4.js><\/scr"+"ipt>");
  else _d.write("<scr"+"ipt type=text/javascript src=mmenudom.js><\/scr"+"ipt>");
</script>
-->

<script type="text/javascript" src="menu_data_body.js"></script>
</head>

<body>
<script>
function openIFrame(iFrameId,winURL)
{
   ifId=gmobj(iFrameId)
   ifId.src=winURL
}

</script>
<P> <P>  This is a body page with an iframe below<P><P>
<table cellSpacing=0 cellPadding=6 border=0 style="border:1px solid #aaaaaa" width="100%">
   <tr>
      <td class=backG align=center>
      <b>Testing Frameset with Iframe on Body Page</b></td>
   </tr>
<tr>
      <td class=backG align=center></td>
   </tr>
   <tr>
      <td class=form1>
            <table cellSpacing=1 cellPadding=13 width=100% border=1 bordercolor="red">
            <tr>
               <td class=backW>
               <iframe width=100% height=200 id=tempiframe name=tempiframe src="testiframe.htm"></iframe>
               </td>
            </tr>
         </table><p>This is the body page of the frameset where the
      submenus open. The submenus open at the top of this page and their submenus drop over the iframe.</td>
   </tr>
      
</table>
</body>
</html>


2. Open the index page for the frame set and change the page for the body frame to body-test.htm
Code:
<frame name="body" src="body-test.htm">

3. Open the menu_data_body.js file and change the sub1.1 submenu to the following
Code:
with(milonic=new menuname("sub1.1")){
style=subStyle;
aI("text=Open page1;url=page1.htm;target=tempiframe;");
aI("text=Open page2;url=page2.htm;target=new;");
}



Save all this and then open the frameset, go to the Top 1 at the top or the Side 1 at the side and then test the page links. The Open Page 1 link will open in the tempiframe and the Open Page 2 link opens in a new window.

The submenu in the body page opens and drops over the iframe. I have tested this on IE5.5, FF 1.0.5, NN7.51, you'll have to test in newer browsers since I can't get to mine right now. Perhaps I have misunderstood and this is not what you want. If not, can you provide a page for us to see what it is you do want to do?

Please note one problem, which perhaps Opera has finally fixed in the newer version, I don't know. But, Opera treats inline frames like a frame instead of like part of the page as other browsers, therefore in Opera the menu will not drop over the iframe.

Ruth


Poster: max matador
Dated: Wednesday November 15 2006 - 21:54:51 GMT

Thank you Ruth!
I'll try it ASAP.
Meanwhile, here's the site http://www.los-plantronics.com/indexbak.htm (without the submenus) if you want to check it out.

Max


Poster: max matador
Dated: Thursday November 16 2006 - 8:12:48 GMT

Ruth,
it's not working with IE6.
Both mainmenus (header and side frame) disappears and the IE statusbar shows a "Error on page" message.

Max