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

listmenus & overflow=scroll


Poster: cornernote
Dated: Monday September 4 2006 - 8:29:02 BST

Hello,

I cannot seem to get overflow=scroll to work with listmenus. Here is the code (pretty much straight from the listmenus example). I added overflow='scroll';itemheight='100';.

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>

<script type="text/javascript" src="../../milonic_src.js"></script>
<a class=milonic href="http://www.milonic.com/">JavaScript Menu, DHTML Menu Powered By Milonic</a>
<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="listmenus.js"></script>

<ul ID=milonicmenu1>
        <li><a href=index.html>Home Menu 1</a></li>
        <li><a href=#>Milonic</a>
        <ul>
                <li><a href=http://www.milonic.com/cbuy.php>Product Purchasing Page</a></li>
                <li><a href=http://www.milonic.com/contactus.php>Contact Us</a></li>
                <li><a href=http://www.milonic.com/newsletter.php>Newsletter Subscription</a></li>
                <li><a href=http://www.milonic.com/menufaq.php>FAQ</a></li>
                <li><a href=http://www.milonic.com/forum/>Discussion Forum</a></li>
                <li><a href=http://www.milonic.com/licenses.php>Software License Agreement</a></li>
                <li><a href=http://www.milonic.com/privacy.php>Privacy Policy</a></li>
                <li><a href=http://www.milonic.com/cbuy.php>Product Purchasing Page</a></li>
                <li><a href=http://www.milonic.com/contactus.php>Contact Us</a></li>
                <li><a href=http://www.milonic.com/newsletter.php>Newsletter Subscription</a></li>
                <li><a href=http://www.milonic.com/menufaq.php>FAQ</a></li>
                <li><a href=http://www.milonic.com/forum/>Discussion Forum</a></li>
                <li><a href=http://www.milonic.com/licenses.php>Software License Agreement</a></li>
                <li><a href=http://www.milonic.com/privacy.php>Privacy Policy</a></li>
                <li><a href=http://www.milonic.com/cbuy.php>Product Purchasing Page</a></li>
                <li><a href=http://www.milonic.com/contactus.php>Contact Us</a></li>
                <li><a href=http://www.milonic.com/newsletter.php>Newsletter Subscription</a></li>
                <li><a href=http://www.milonic.com/menufaq.php>FAQ</a></li>
                <li><a href=http://www.milonic.com/forum/>Discussion Forum</a></li>
                <li><a href=http://www.milonic.com/licenses.php>Software License Agreement</a></li>
                <li><a href=http://www.milonic.com/privacy.php>Privacy Policy</a></li>
                <li><a href=http://www.milonic.com/cbuy.php>Product Purchasing Page</a></li>
                <li><a href=http://www.milonic.com/contactus.php>Contact Us</a></li>
                <li><a href=http://www.milonic.com/newsletter.php>Newsletter Subscription</a></li>
                <li><a href=http://www.milonic.com/menufaq.php>FAQ</a></li>
                <li><a href=http://www.milonic.com/forum/>Discussion Forum</a></li>
                <li><a href=http://www.milonic.com/licenses.php>Software License Agreement</a></li>
                <li><a href=http://www.milonic.com/privacy.php>Privacy Policy</a></li>
                <li><a href=http://www.milonic.com/cbuy.php>Product Purchasing Page</a></li>
                <li><a href=http://www.milonic.com/contactus.php>Contact Us</a></li>
                <li><a href=http://www.milonic.com/newsletter.php>Newsletter Subscription</a></li>
                <li><a href=http://www.milonic.com/menufaq.php>FAQ</a></li>
                <li><a href=http://www.milonic.com/forum/>Discussion Forum</a></li>
                <li><a href=http://www.milonic.com/licenses.php>Software License Agreement</a></li>
                <li><a href=http://www.milonic.com/privacy.php>Privacy Policy</a></li>
                <li><a href=http://www.milonic.com/cbuy.php>Product Purchasing Page</a></li>
                <li><a href=http://www.milonic.com/contactus.php>Contact Us</a></li>
                <li><a href=http://www.milonic.com/newsletter.php>Newsletter Subscription</a></li>
                <li><a href=http://www.milonic.com/menufaq.php>FAQ</a></li>
                <li><a href=http://www.milonic.com/forum/>Discussion Forum</a></li>
                <li><a href=http://www.milonic.com/licenses.php>Software License Agreement</a></li>
                <li><a href=http://www.milonic.com/privacy.php>Privacy Policy</a></li>
                <li><a href=http://www.milonic.com/cbuy.php>Product Purchasing Page</a></li>
                <li><a href=http://www.milonic.com/contactus.php>Contact Us</a></li>
                <li><a href=http://www.milonic.com/newsletter.php>Newsletter Subscription</a></li>
                <li><a href=http://www.milonic.com/menufaq.php>FAQ</a></li>
                <li><a href=http://www.milonic.com/forum/>Discussion Forum</a></li>
                <li><a href=http://www.milonic.com/licenses.php>Software License Agreement</a></li>
                <li><a href=http://www.milonic.com/privacy.php>Privacy Policy</a></li>
                <li><a href=http://www.milonic.com/cbuy.php>Product Purchasing Page</a></li>
                <li><a href=http://www.milonic.com/contactus.php>Contact Us</a></li>
                <li><a href=http://www.milonic.com/newsletter.php>Newsletter Subscription</a></li>
                <li><a href=http://www.milonic.com/menufaq.php>FAQ</a></li>
                <li><a href=http://www.milonic.com/forum/>Discussion Forum</a></li>
                <li><a href=http://www.milonic.com/licenses.php>Software License Agreement</a></li>
                <li><a href=http://www.milonic.com/privacy.php>Privacy Policy</a></li>
                <li><a href=http://www.milonic.com/cbuy.php>Product Purchasing Page</a></li>
                <li><a href=http://www.milonic.com/contactus.php>Contact Us</a></li>
                <li><a href=http://www.milonic.com/newsletter.php>Newsletter Subscription</a></li>
                <li><a href=http://www.milonic.com/menufaq.php>FAQ</a></li>
                <li><a href=http://www.milonic.com/forum/>Discussion Forum</a></li>
                <li><a href=http://www.milonic.com/licenses.php>Software License Agreement</a></li>
                <li><a href=http://www.milonic.com/privacy.php>Privacy Policy</a></li>
                <li><a href=http://www.milonic.com/cbuy.php>Product Purchasing Page</a></li>
                <li><a href=http://www.milonic.com/contactus.php>Contact Us</a></li>
                <li><a href=http://www.milonic.com/newsletter.php>Newsletter Subscription</a></li>
                <li><a href=http://www.milonic.com/menufaq.php>FAQ</a></li>
                <li><a href=http://www.milonic.com/forum/>Discussion Forum</a></li>
                <li><a href=http://www.milonic.com/licenses.php>Software License Agreement</a></li>
                <li><a href=http://www.milonic.com/privacy.php>Privacy Policy</a></li>
                <li><a href=http://www.milonic.com/cbuy.php>Product Purchasing Page</a></li>
                <li><a href=http://www.milonic.com/contactus.php>Contact Us</a></li>
                <li><a href=http://www.milonic.com/newsletter.php>Newsletter Subscription</a></li>
                <li><a href=http://www.milonic.com/menufaq.php>FAQ</a></li>
                <li><a href=http://www.milonic.com/forum/>Discussion Forum</a></li>
                <li><a href=http://www.milonic.com/licenses.php>Software License Agreement</a></li>
                <li><a href=http://www.milonic.com/privacy.php>Privacy Policy</a></li>
                <li><a href=http://www.milonic.com/cbuy.php>Product Purchasing Page</a></li>
                <li><a href=http://www.milonic.com/contactus.php>Contact Us</a></li>
                <li><a href=http://www.milonic.com/newsletter.php>Newsletter Subscription</a></li>
                <li><a href=http://www.milonic.com/menufaq.php>FAQ</a></li>
                <li><a href=http://www.milonic.com/forum/>Discussion Forum</a></li>
                <li><a href=http://www.milonic.com/licenses.php>Software License Agreement</a></li>
                <li><a href=http://www.milonic.com/privacy.php>Privacy Policy</a></li>
                <li><a href=http://www.milonic.com/cbuy.php>Product Purchasing Page</a></li>
                <li><a href=http://www.milonic.com/contactus.php>Contact Us</a></li>
                <li><a href=http://www.milonic.com/newsletter.php>Newsletter Subscription</a></li>
                <li><a href=http://www.milonic.com/menufaq.php>FAQ</a></li>
                <li><a href=http://www.milonic.com/forum/>Discussion Forum</a></li>
                <li><a href=http://www.milonic.com/licenses.php>Software License Agreement</a></li>
                <li><a href=http://www.milonic.com/privacy.php>Privacy Policy</a></li>
        </ul>
        </li>
</ul>


<script>
_menuCloseDelay=500;
_menuOpenDelay=150;
_subOffsetTop=2;
_subOffsetLeft=-2;

with(menuStyle=new mm_style()){
bordercolor="#999999";
borderstyle="solid";
borderwidth=1;
fontfamily="Verdana, Tahoma, Arial";
fontsize="75%";
fontstyle="normal";
headerbgcolor="#ffffff";
headercolor="#000000";
offbgcolor="#eeeeee";
offcolor="#000000";
onbgcolor="#ddffdd";
oncolor="#000099";
outfilter="randomdissolve(duration=0.3)";
overfilter="Fade(duration=0.2);Alpha(opacity=90);Shadow(color=#777777', Direction=135, Strength=3)";
padding=4;
pagebgcolor="#82B6D7";
pagecolor="black";
separatorcolor="#999999";
separatorsize=1;
subimage="../../arrow.gif";
subimagepadding=2;
}


buildListMenu("milonicmenu1","menuStyle","alwaysvisible=true; orientation='horizontal'; top=10; left=10; overflow='scroll'; itemheight='100';")
</script>

</body>
</html>


Poster: cornernote
Dated: Monday September 4 2006 - 12:26:00 BST

Ok - I got it... Just had to hack the JS file a little.

FIND
Code:
                        _y6+="with(milonic=new menuname('"+_mN+"')){"


REPLACE WITH
Code:
                        _y6+="with(milonic=new menuname('"+_mN+"')){ overflow=\"scroll\";"


Poster: Andy
Dated: Monday September 4 2006 - 12:30:27 BST

Hi,

Which menu do you want the scroll bars applying to?

The main menu is horizontal so scrollbars will not work with that menu


Poster: cornernote
Dated: Monday September 4 2006 - 14:58:04 BST

I want it to apply to the menu under <a href=#>Milonic</a>. The really long one.

I think the main issue is that there is no way to assign properties to the sub-menus. If there is a way then forgive me, I just couldnt figure it out. Perhaps assigning options like this could be possible?
Code:
<ul style="overflow:scroll;orientation:'vertical';">



Brett


Poster: cornernote
Dated: Monday September 4 2006 - 15:13:17 BST

also target="_blank" doesnt work in ght <a> tag.


Poster: cornernote
Dated: Monday September 4 2006 - 15:18:02 BST

Ok - fixed the target...

FIND
Code:
if(_y4.href.substr(_y4.href.length-1,1)!="#")_y3[_y1][_y3[_y1].length-1]+="url="+_y4+";"


INSERT THIS BELOW
Code:
if(_y4.target)_y3[_y1][_y3[_y1].length-1]+="target="+_y4+";"


Poster: cornernote
Dated: Monday September 4 2006 - 15:46:54 BST

cornernote wrote:
I want it to apply to the menu under <a href=#>Milonic</a>. The really long one.

I think the main issue is that there is no way to assign properties to the sub-menus. If there is a way then forgive me, I just couldnt figure it out. Perhaps assigning options like this could be possible?
Code:
<ul style="overflow:scroll;orientation:'vertical';">




After looking at the code, this probably isnt the bext way to do it. How about enclosing each <ul> in a <div> like this:
Code:
<div>overflow:scroll;orientation:'vertical';<ul><li><a href="xxx">xxx</a></li></ul></div>


Then the options in the div could be read and passed into the menu. I looked at the code but thats getting a little complex for me. Maybe theres a better way to do it too. I'm just thinking out loud here. :)


Brett


Poster: Ruth
Dated: Monday September 4 2006 - 20:20:07 BST

Hi,

Could you put up a test page for us to use? We have no way to see what version you're using.

try using target=new; or target=blank; instead of editing the file. I can't even find anything about target in what you posted.

We really can't help if you are going to modify the files.

Ruth


Poster: cornernote
Dated: Tuesday September 5 2006 - 2:44:58 BST

I am using Version 5.756 with the 2 modifications that I put in above.

The pages I am playing with are extras/listbased_menu/* in the current release.

The 2 things I want to do are:

1. Pass menu properties to sub menus (like overflow and orentation).

2. Open links in a new window instead of the current window.

I am only posting my code changes here because it appears there is no way to do these things and I am trying to help others who have the same problems.

Perhaps the code changes will be added to the next version and improved upon.

I am still stuck on point 1. I can add global properties that will effect all sub-menus (such as my modification for overflow), but there is no way to define properties per menu. This is why I suggested adding something into the DIV tag as per the example I provided. I am just not good enough at JS to implement the code into listmenus.js.

Perhaps one of the authors could take a peek? ;)