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

Pop-up scrolling in Firefox [nevermind, fixed]


Poster: Shap5202
Dated: Wednesday August 30 2006 - 15:33:05 BST

I'm having this problem with a pop-up menu that appears on click, where if the menu has sub-menus, and the browser has been scrolled, the sub-menus can appear off-screen (or farther up the page where they would have been pre scrolling). This only occurs in FF.

This is a simplified version of the actual code, but accurately recreates the problem:

HTML file
Code:
<html>
<head>
<title>Milonic DHTML/JavaScript Menu Sample Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />

</head>

<body>
<!-- ***** This is the section of code you need to paste into your web pages ***** -->
<script type="text/javascript" src="milonic_src.js"></script>
<noscript><a href="http://www.milonic.com/">JavaScript Menus and DHTML Menus Powered by Milonic</a></noscript>
<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.js"></script>
<div style="height: 400px; border: 1px solid;">

</div>
<input type="button" value="click" onclick="popup('popupmenu',1)">
<div style="height: 400px; border: 1px solid;">

</div>
</body>
</html>


menu_data.js
Code:
fixMozillaZIndex=true; //Fixes Z-Index problem  with Mozilla browsers but causes odd scrolling problem, toggle to see if it helps
_menuCloseDelay=500;
_menuOpenDelay=150;
_subOffsetTop=2;
_subOffsetLeft=-2;

with(mainStyle=new mm_style()){
   bordercolor="#9BA6C2";
   borderstyle="solid";
   borderwidth=1;      
   closeonclick=true;
   fontfamily="arial, tahoma";
   fontsize="11px";
   fontstyle="normal";
   headerbgcolor="#94BCF8";
   headerborder="1px solid #1852D8";
   headercolor="#000000";
   imagepadding=4;
   imagealign="top";
   menubgcolor="#FFFFFF";
   offbgcolor="transparent";
   offcolor="#000000";
   onbgcolor="#FEFAD2";
   oncolor="#000000";
   padding=7;
   separatoralign="right";
   separatorcolor="#999999";
   separatorpadding=1;
   separatorwidth="85%";
}

   with(milonic=new menuname("popupmenu")){
      style=mainStyle;
      style.padding=0;
      style.fontsize="10px";
      orientation="vertical";
      overflow="scroll";
      
      aI("text=Summary");
      aI("text=Update");
      aI("text=Add;showmenu=Add;");
      aI("text=Apply;showmenu=Apply;");
      aI("text=This");
      aI("text=Is");
      aI("text=Fine");
   }
   
   with(milonic=new menuname("Add")){
      style=mainStyle;
      style.padding=0;
      style.fontsize="10px";
      orientation="vertical";
      overflow="scroll";
      
      aI("text=This");
      aI("text=Doesn't");
      aI("text=Scroll;");
   }   
   
   with(milonic=new menuname("Apply")){
      style=mainStyle;
      style.padding=0;
      style.fontsize="10px";
      orientation="vertical";
      overflow="scroll";

      aI("text=Nor");
      aI("text=Does");
      aI("text=This;");
   }   



drawMenus();


I put the div blocks in just to take up some space and allow you to scroll (may have to shrink your browser window a little bit too)

Sorry for the poor styling, just didn't take the time to make it look nice. The 'Add' and 'Apply' options should display submenus, but in FF, they dont show up when you're scrolled down on the page.

Not sure if i'm just missing a property or two, or something else.. but any help would be appreciated, thanks.

After continuing to search the boards and tweaking my search I found this
http://www.milonic.com/forum/viewtopic. ... ll+problem
which seems to fix this problem, and hopefully not causes others :)