CPU at 100%
CPU at 100%
I have investigated a bit further the problem I submitted earlier with the vertical menu, I have created a smaller menu arborescence of about 300 lines and still when I click on the menu the CPU reach 100% and the machine is stuck for 10 seconde then the window asking me if I want to abort the script pop up I click on Yes and can continue working.
We are currently evaluating the menu, if we are confident it will work in our environment we will get the corporate licence right away, could we send you our code so you can investigate further and tell us if there is something wrong ?
We are currently evaluating the menu, if we are confident it will work in our environment we will get the corporate licence right away, could we send you our code so you can investigate further and tell us if there is something wrong ?
droste-effect
I don't know what your previous post was, but maybe you have something in your code as this:
And that's what may cause your CPU to 100%, because the submenu of Alpha, is Alpha, and the submenu there of is again, Alpha; to the infinity.
Code: Select all
with(milonic=new menuname("Alpha")){
style=menuStyle;
aI("text=Geschiedenis;showmenu=Alpha;");
aI("text=Test;url=test.html;");
}
Thank you,
sorry I cannot provide an URL, the website I am working on is on our Intranet.
I tried with a much shorter menu and but still the CPU hits 100% for about 10 sec whatever I use IE or firefox, the menu_data.js is the only modified file:
sorry I cannot provide an URL, the website I am working on is on our Intranet.
I tried with a much shorter menu and but still the CPU hits 100% for about 10 sec whatever I use IE or firefox, the menu_data.js is the only modified file:
Is there something wrong with it ?
/*
Milonic DHTML Menu - JavaScript Website Navigation System.
Copyright 2004 (c) Milonic Solutions Limited. All Rights Reserved.
Version 5+ Data File structure is the property of Milonic Solutions Ltd and must only be used in Milonic DHTML Products
This is a commercial software product, please visit http://milonic.com/ for more information.
See http://milonic.com/license.php for Commercial License Agreement
All Copyright statements must always remain in place in all files at all times
******* PLEASE NOTE: THIS IS NOT FREE SOFTWARE, IT MUST BE LICENSED FOR ALL USE *******
*/
_menuCloseDelay=500 // The time delay for menus to remain visible on mouse out
_menuOpenDelay=150 // The time delay before menus open on mouse over
_subOffsetTop=10 // Sub menu top offset
_subOffsetLeft=-10 // Sub menu left offset
with(menuStyle=new mm_style()){
onbgcolor="#990003";
oncolor="white";
offbgcolor="#ffc6a5";
offcolor="black";
bordercolor="black";
borderstyle="solid";
borderwidth=1;
separatorcolor="black";
separatorsize="1";
padding=5;
fontsize="70%";
fontstyle="normal";
fontfamily="Arial, Helvetica, Verdana";
pagecolor="black";
pagebgcolor="#82B6D7";
headercolor="#ffffff";
headerbgcolor="#000099";
subimage="/menus/arrow.gif";
subimagepadding="2";
overfilter="Alpha(style=0,opacity=100);Shadow(color='#666666', Direction=135, Strength=2)";
}
with(milonic=new menuname("")){
style=menuStyle
alwaysvisible=1;
top=180;
left=10;
overflow="scroll";
followscroll=1;
itemwidth=158
aI("text=example.html;url=/example.html;");
aI("text=johan.html;url=/johan.html;");
aI("text=ploc.html;url=/ploc.html;");
aI("text=test.html;url=/test.html;");
aI("text=Overview;showmenu=Overview;url=/Overview;");
aI("text=Teams;showmenu=Teams;url=/Teams;");
}
with(milonic=new menuname("Overview")){
style=menuStyle
aI("text=Contact_Info;url=/Overview/Contact_Info;");
aI("text=Organization_Charts;url=/Overview/Organization_Charts;");
}
with(milonic=new menuname("Teams")){
style=menuStyle
aI("text=Contact_Info;url=/Teams/Contact_Info;");
aI("text=Organization_Charts;url=/Teams/Organization_Charts;");
}
drawMenus();
We still need to know what version. In the milonic_src.js file it will give a version near the top 5.69 or something. I just put the data in a file and called the menu on a blank page and there's no problem. I get no cpu 100% or anything like that.
I don't see anything about pop up in the menu data file you posted. Since you can't post a page, we would need the html page code and any css code you are using so we can duplicate the page and see what's going on.
Ruth
namba wrote:...window asking me if I want to abort the script pop up I click on Yes and can continue working.
I don't see anything about pop up in the menu data file you posted. Since you can't post a page, we would need the html page code and any css code you are using so we can duplicate the page and see what's going on.
Ruth
thanks, the milonic_src.js file (as well as mmenudom.js and mmenuns4.js) vesion is:
here is my test html file:Version 5.63 - Built: Friday December 10 2004 - 18:50
please tell me your email in PM and I will send you a zip of the files I use.<html>
<head>
<title>test</title>
</head>
<body>
<!-- Millonic menu -->
<script type="text/javascript" language="JavaScript" src="/_javascript/milonic_src.js"></script>
<script type="text/javascript" language="JavaScript" >
<!--
if(ns4)_d.write("<script type=\"text\/javascript\" language=\"JavaScript\" src=\/_javascript\/mmenuns4.js><\/script>");
else _d.write("<script type=\"text\/javascript\" language=\"JavaScript\" src=\/_javascript\/mmenudom.js><\/script>");
-->
</script>
<!-- vertical menu -->
<script type="text/javascript" language="JavaScript" src="/_javascript/menu_data_test.js"></script>
<!-- End Millonic menu -->
</body>
</html>
Thank you Ruth, I have upgraded to the latest version:
_Johan (index.html. johan.html)
├─Overview (index.html)
└─Teams (index.html)
all the .html have the following code:
to my test url http://devserver/_johan/ the page got load immediatly and the menu is displayed, the problem occur when I click on a link, for example I click on "Teams" and the PC froze (the CPU reach 100%) for a couple of seconds, then I got the popup asking me if I want to abort the script, if I abort it I can continue

For my test I just modified the menu_data.js (which I named menu_data_test.js), as below:Version 5.691 - Built: Wednesday January 12 2005 - 11:49
I have created a directory tree as follow:/*
Milonic DHTML Menu - JavaScript Website Navigation System.
Copyright 2004 (c) Milonic Solutions Limited. All Rights Reserved.
Version 5+ Data File structure is the property of Milonic Solutions Ltd and must only be used in Milonic DHTML Products
This is a commercial software product, please visit http://milonic.com/ for more information.
See http://milonic.com/license.php for Commercial License Agreement
All Copyright statements must always remain in place in all files at all times
******* PLEASE NOTE: THIS IS NOT FREE SOFTWARE, IT MUST BE LICENSED FOR ALL USE *******
*/
_menuCloseDelay=500 // The time delay for menus to remain visible on mouse out
_menuOpenDelay=150 // The time delay before menus open on mouse over
_subOffsetTop=10 // Sub menu top offset
_subOffsetLeft=-10 // Sub menu left offset
with(menuStyle=new mm_style()){
onbgcolor="#4F8EB6";
oncolor="#ffffff";
offbgcolor="#DCE9F0";
offcolor="#515151";
bordercolor="#296488";
borderstyle="solid";
borderwidth=1;
separatorcolor="#2D729D";
separatorsize="1";
padding=5;
fontsize="75%";
fontstyle="normal";
fontfamily="Verdana, Tahoma, Arial";
pagecolor="black";
pagebgcolor="#82B6D7";
headercolor="#000000";
headerbgcolor="#ffffff";
overfilter="Fade(duration=0.2);Alpha(opacity=90);Shadow(color='#777777', Direction=135, Strength=5)";
outfilter="randomdissolve(duration=0.3)";
}
with(milonic=new menuname("")){
style=menuStyle;
top=240;
left=10;
alwaysvisible=1;
orientation="vertical";
aI("text=johan.html;url=/_johan/johan.html");
aI("text=Overview;showmenu=Overview;url=/_johan/Overview/index.html");
aI("text=Teams;showmenu=Teams;url=/_johan/Teams/index.html");
}
with(milonic=new menuname("Overview")){
style=menuStyle;
overflow="scroll";
aI("text=submenu1;url=none;");
aI("text=submenu2;url=none;");
}
with(milonic=new menuname("Teams")){
style=menuStyle;
overflow="scroll";
aI("text=submenu1;url=none;");
aI("text=submenu2;url=none;");
}
drawMenus();
_Johan (index.html. johan.html)
├─Overview (index.html)
└─Teams (index.html)
all the .html have the following code:
The first time I point my browser (either Firefox v1.0 or IE 6.0.2800.1106)<html>
<head>
<title>test</title>
</head>
<body>
<!-- Millonic menu -->
<script type="text/javascript" language="JavaScript" src="/_javascript/milonic_src.js"></script>
<script type="text/javascript" language="JavaScript" >
<!--
if(ns4)_d.write("<script type=\"text\/javascript\" language=\"JavaScript\" src=\/_javascript\/mmenuns4.js><\/script>");
else _d.write("<script type=\"text\/javascript\" language=\"JavaScript\" src=\/_javascript\/mmenudom.js><\/script>");
-->
</script>
<!-- vertical menu -->
<script type="text/javascript" language="JavaScript" src="/_javascript/menu_data_test.js"></script>
<!-- End Millonic menu -->
</body>
</html>
to my test url http://devserver/_johan/ the page got load immediatly and the menu is displayed, the problem occur when I click on a link, for example I click on "Teams" and the PC froze (the CPU reach 100%) for a couple of seconds, then I got the popup asking me if I want to abort the script, if I abort it I can continue

I don't know if this would matter, but the call for the menus is different than you have.
Let's assume the files are at milonic, the call for the mmenudom.js and menuns4.js would be
Note that there is a scr+ipt in the call. I don't know if changing that to what you have would cause problems or not.
Ruth
Let's assume the files are at milonic, the call for the mmenudom.js and menuns4.js would be
Code: Select all
<script language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=http:\/
\/milonic.com\/mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=http:\/
\/milonic.com\/mmenudom.js><\/scr"+"ipt>");
</script>
Ruth
Thanks Ruthm I tried your code but same problem.
I did another test along those lines I hardcoded each options of the if:
could something be wrong in the mmenudom.js file ?
I did another test along those lines I hardcoded each options of the if:
-> quick but the menu is unusable<script type="text/javascript" language="JavaScript" src="/_javascript/milonic_src.js"></script>
<script type="text/javascript" language="JavaScript" src="/_javascript/mmenuns4.js"></script>
<script type="text/javascript" language="JavaScript" src="/_javascript/menu_data_test.js"></script>
-> the CPU got to 100%<script type="text/javascript" language="JavaScript" src="/_javascript/milonic_src.js"></script>
<script type="text/javascript" language="JavaScript" src="/_javascript/mmenudom.js"></script>
<script type="text/javascript" language="JavaScript" src="/_javascript/menu_data_test.js"></script>
could something be wrong in the mmenudom.js file ?
I've used your code and the page you posted and opened it in Netscape6.1 and 7.1, Firebird .07, IE5.5 and I do not get the message you are getting. I don't know what else to suggest. You might repost this topic..perhaps Still getting cpu100% error or something like that and maybe someone else will be able to help. Sorry, I can't do more.
Ruth
Ruth
I brought you code down to my server and am having no troubles at all (running 5.69 right now). No spikes, no delays, no errors. See http://www.west.asu.edu/sa/testsite/.
My menu call is a bit different than both yours and Ruth's...
...but I have no idea if that's a problem.
My menu call is a bit different than both yours and Ruth's...
Code: Select all
if(ns4)_d.write("<scr"+"ipt language=javascript src=/sa/menu5/mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=javascript src=/sa/menu5/mmenudom.js><\/scr"+"ipt>");
John
Hi namba,
Please sit down, because once you learn what the problem is, you might smack yourself in the forehead
The problem is that your main menu does not have a name. Note that in your last menu_data_test.js code, your main menu is:
It looks good for the most part, but in the first line of code, the menu name is a null string: menuname(""). This was true in the previous test code as well. I'm guessing that it was probably just a simple oversight; one of those little, easy-to-miss things that screws everything up and drives you nuts trying to find later (my personal demon is using a = operator when I should've used ==).
So, instead of
put a name in there. Any name will do. For example:
That should do it!
Cheers,
Kevin
Please sit down, because once you learn what the problem is, you might smack yourself in the forehead

The problem is that your main menu does not have a name. Note that in your last menu_data_test.js code, your main menu is:
Code: Select all
with(milonic=new menuname("")){
style=menuStyle;
top=240;
left=10;
alwaysvisible=1;
orientation="vertical";
aI("text=johan.html;url=/_johan/johan.html");
aI("text=Overview;showmenu=Overview;url=/_johan/Overview/index.html");
aI("text=Teams;showmenu=Teams;url=/_johan/Teams/index.html");
}
It looks good for the most part, but in the first line of code, the menu name is a null string: menuname(""). This was true in the previous test code as well. I'm guessing that it was probably just a simple oversight; one of those little, easy-to-miss things that screws everything up and drives you nuts trying to find later (my personal demon is using a = operator when I should've used ==).
So, instead of
Code: Select all
with(milonic=new menuname("")){
Code: Select all
with(milonic=new menuname("MainMenu")){
Cheers,
Kevin
kevin3442 wrote:...once you learn what the problem is, you might smack yourself in the forehead![]()
John wrote:Smart aleck![]()

Did you test locally, or through http? When I tried namba's test scheme (his directory structure and all) directly from a local hard disk, then everything worked fine; no CPU spike, no warning. But when I uploaded the same exact code to our staging server, and tried it as served pages, then I got the CPU spike and the warning dialog, just as namba described. Why? Beats me! It seems sort of odd to me. Since the menus are rendered on the client side, why would it make a difference? I'm at a loss to explain it. If anyone knows, please enlighten me!John wrote:So why doesn't it fail here with his code...
Cheers,
Kevin