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:56

Frames Problem..Emergency help needed


Poster: pangjin
Dated: Saturday January 22 2005 - 18:15:14 GMT

Hi all,

If you refer to this link.

http://203.120.174.21/test/8index.htm

How can i make sure the submenu will appear on the bottom frame instead of the top frame as it shows. Appreciate all help.


Poster: Ruth
Dated: Saturday January 22 2005 - 19:35:30 GMT

Hi pangjin,
First, you need to upgrade, you are using version 5.12 which is way way downlevel, fixes and improvements have been added over time, so you need to download the new version 5.691.
To use Milonic with frames you need to use a custom function that was written by one of the volunteers on the forum. HERE's the link. This function uses the pop function of the menu to achieve a frames menu.

In effect his function would use a main_data.js file in the top frame of your setup with the 3 other files, and then ALL the other pages which will be loaded in the bottom frame would have to have the 3 program files on them plus a sub_data.js file, this file would include all the submenus. There is no support from Milonic for the function, but you can post here if you have questions about it.

The other alternative, is to use an iframe instead of frames if that is possible. The menu is designed to work with iframes and will even drop over the iframe, unlike in a frameset which has each frame a different instance of a browser. I put together a test for you to try, I left out the picture and things from your top frame that doesn't show when you load the page. Not sure how that would be done with an iframe, if you put it into the page then it will shift the iframe way down.
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<HTML><HEAD><TITLE>::: City Cab ::: Fleet Management System :::</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1"><LINK
href="citycab.css" rel=stylesheet>
<STYLE type=text/css>.tblHead3 {
FONT-WEIGHT: bold; FONT-SIZE: x-small; COLOR: #006666;
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
#marquee {
   RIGHT: 0px; LEFT: 0px; COLOR: white; POSITION: absolute; TOP: 22px
}
</STYLE>

<SCRIPT language=JavaScript type=text/JavaScript>
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
</SCRIPT>

<SCRIPT>


var tid;
var left1;
var windowwidth;

function initLeft() {
  if (document.layers)
    left1 = document.marquee.left;
  else if (document.all)
    left1 = document.all.marquee.offsetLeft;
  else if (document.getElementById)
    left1 = document.getElementById('marquee').offsetLeft;



   if (document.layers) { //NN
      windowwidth = window.innerWidth; //get window width
   }
   else { //IE
      windowwidth = document.body.clientWidth; //get window width
   }



}
function moveLeft () {
  if (typeof left1 == 'undefined')
    initLeft();
//alert(document.all.length);
//alert(document.all.marquee.offsetWidth);
//alert(document.all.marquee.scrollWidth);
//alert(screen.width);
//alert(window.screen.availWidth);


  if (document.layers){
    alert("layers");
    if (left1>-(document.all.marquee.scrollWidth-windowwidth+25)){
      left1 -= 1;
      document.marquee.left = left1;
      }
    }
  else if (document.all){
    if (left1>-(document.all.marquee.scrollWidth-windowwidth+25)){
      left1 -= 1;
      document.all.marquee.style.pixelLeft = left1;
      }
    }
  else if (document.getElementById){
      left1 -= 1;
      document.getElementById('marquee').style.left = left1 + 'px';
    }
}

function moveRight () {
  if (typeof left1 == 'undefined')
    initLeft();
 
  if (left1<5){
  left1 += 1;
  if (document.layers)
    document.marquee.left = left1;
  else if (document.all)
    document.all.marquee.style.pixelLeft = left1;
  else if (document.getElementById)
    document.getElementById('marquee').style.left = left1 + 'px';
  }
}
</SCRIPT>
<script>
function openIFrame(iFrameId,winURL)
{
   ifId=gmobj(iFrameId)
   ifId.src=winURL
}

</script>
<META content="MSHTML 5.50.4807.2300" name=GENERATOR></HEAD>
<BODY bgColor=#dcdcdc leftMargin=0 background=greet_files/greet_background.jpg
topMargin=0 marginwidth="0" marginheight="0">
<SCRIPT language=JavaScript src="greet_files/milonic_src.js"
type=text/javascript></SCRIPT>

<SCRIPT language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=mmenuns4.js><\/scr"+"ipt>");      
  else _d.write("<scr"+"ipt language=JavaScript src=mmenudom.js><\/scr"+"ipt>");
</SCRIPT>

<SCRIPT language=JavaScript src="greet_files/menu_data.js"
type=text/javascript></SCRIPT>
<SPAN id=marquee>
<SCRIPT language=JavaScript>
<!--

with(citycab=new menuname("Main Menu")){
style=menuStyle;
//top=10;
//menuwidth="100%";
menualign="center";
alwaysvisible=1;
orientation="horizontal";
followscroll=1;
position="relative";
overflow="scroll";
aI("text=Main111;showmenu=Main Menu1;");
aI("text=Driver Application;url=http://www.milonic.com/;status=Back To Home Page;");
aI("text=Driver Management;showmenu=Samples;");
aI("text=System Administration;showmenu=Milonic;");
aI("text=Master Table;showmenu=Main Menu1;");
aI("text=System Configuration;showmenu=Links;");
aI("text=testst;showmenu=Main Menu1;");
aI("text=testst;showmenu=Milonic;");
aI("text=testst;showmenu=Milonic;");
aI("text=testst;showmenu=Milonic;");
aI("text=testst;showmenu=Milonic;");
aI("text=testst;showmenu=Milonic;");
aI("text=testst;showmenu=Milonic;");
}
drawMenus();
//-->
</SCRIPT>
</SPAN>
<TABLE class=tblBlockquote cellSpacing=0 cellPadding=2 width="100%" border=0>
  <TBODY>
  <TR vAlign=top align=left>
    <TD class=tblHead><A onmouseover="tid1 = setInterval('moveLeft()', 20)"
      onmouseout=clearInterval(tid1); href="javascript:%20void%200"><IMG
      height=19 alt="" src="greet_files/button_leftB.jpg" width=19
    border=0></A></TD>
    <TD class=tblHead vAlign=center align=middle>Welcome</TD>
    <TD class=tblHead align=right><A
      onmouseover="tid1 = setInterval('moveRight()', 20)"
      onmouseout=clearInterval(tid1); href="javascript:%20void%200"><IMG
      height=19 alt="" src="greet_files/button_rightB.jpg" width=19
    border=0></A></TD></TR></TBODY></TABLE>
<iframe width=102% height=99% id=tempiframe src="about:blank"></iframe>
</body>
</html>


Hope this helps

Ruth