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

Menu freezes browsers


Poster: chris __at__ KIPdesign.com
Dated: Friday April 29 2005 - 1:24:13 BST

Hi,

We are trying to update our site from our old menu system to the milonic menu system and it isn't working. When you first go to the site the first page you go to will open slowly. Then if you try and go to any link from the drop down menus the browser freezes. Eventually a window pops up saying a "a script on this page is casuing [browser] to run slowly. If it continues to run, your computer may become unresponsive"

The original site is at:
http://www.kipdesign.com/silveroakoriginal

the one we are updating to the Milonic Menus is at:
http://www.kipdesign.com/silveroaknew

This is the code for the beginning of each page which calls the include:
Code:
<!-- LOAD STYLE SHEETS -->
<link rel="stylesheet" href="../stylesheets/pagecontent.css" type="text/css">  <!-- FILE: pagecontent.css  LOCATION: stylesheets  DESCRIPTION: This is the stylesheet for the main page content -->

<!-- LOAD SCRIPTS -->
<script type="text/javascript" src="../scripts/date.js"></script>  <!-- FILE: date.js  LOCATION: scripts  DESCRIPTION: This is the script that determines the current date -->
<script type="text/javascript" src="../scripts/standardscripts.js"></script>  <!-- FILE: standardscripts.js  LOCATION: scripts  DESCRIPTION: These are the standard Macromedia swap image scripts -->
<script type="text/javascript" src="../scripts/milonic_src.js"></script>  <!-- FILE: milonic_src.js  LOCATION: scripts  DESCRIPTION: This is the script that creates the drop down menus -->   
<script   type="text/javascript">
<!--
   if(ns4)_d.write("<script language=JavaScript src=../scripts/mmenuns4.js><\/script>");else _d.write("<script language=JavaScript src=../scripts/mmenudom.js><\/script>");
-->
</script>
<script type="text/javascript" src="../scripts/menu_data.js"></script>  <!-- FILE: menu_data.js  LOCATION: scripts  DESCRIPTION: This is the script that contains all data for the drop down menus -->

</head>

<body onload="MM_preloadImages('../images/bar_about_over.gif','../images/bar_about.gif','../images/bar_careers_over.gif','../images/bar_careers.gif','../images/bar_home_over.gif','../images/bar_home_over.gif','../images/bar_news_over.gif','../images/bar_solutions_over.gif','../images/bar_solutions.gif')">

<!--  INTERFACE INCLUDE CODE -->
<?php include("../includes/interface_inc_mil.php"); ?>

<!-- ::::::::::::::::::::  BEGIN PAGE CONTENT HOLDER  :::::::::::::::::::: -->


This is the code for the include that is called by each page for the top menu bar (interface_inc_mil.php):
Code:
<!--  TOP HEADER TABLE -->
<table id="Header" width="898" height="102" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td><img src="../images/interface_header_01.gif" alt="" name="dateholder" width="375" height="21" id="dateholder"></td>
    <td><img src="../images/interface_header_02.gif" alt="" name="top_middle" width="125" height="21" id="top_middle"></td>
    <td><img src="../images/interface_header_03.gif" alt="" name="top_panel3" width="240" height="21" id="top_panel3"></td>
    <td><a href="home_contactus.php" target="_self" onMouseOver="MM_swapImage('contact','','../images/interface_header_over_04.gif',1)" onMouseOut="MM_swapImgRestore()"><img src="../images/interface_header_04.gif" alt="contact us" name="contact" width="86" height="21" border="0" id="contact"></a></td>
    <td><a href="home_sitemap.php" target="_self" onMouseOver="MM_swapImage('sitemap','','../images/interface_header_over_05.gif',1)" onMouseOut="MM_swapImgRestore()"><img src="../images/interface_header_05.gif" alt="site map" name="sitemap" width="72" height="21" border="0" id="sitemap"></a></td>
  </tr>
  <tr>
    <td><img src="../images/interface_header_06.gif" alt="" name="logo" width="375" height="81" id="logo"></td>
    <td><img src="../images/interface_header_07.gif" width="125" height="81" alt=""></td>
    <td><img src="../images/interface_header_08.gif" width="240" height="81" alt=""></td>
    <td><img src="../images/interface_header_09.gif" width="86" height="81" alt=""></td>
    <td><img src="../images/interface_header_10.gif" width="72" height="81" alt=""></td>
  </tr>
</table>

<!--  BUTTON BAR -->
<table id="buttonbar" width="898" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td><img src="../images/bar_leftshim.gif" width="20" height="22"></td>
    <td><a href="home.php" onMouseOver="MM_swapImage('Home','','../images/bar_home_over.gif',1)" onMouseOut="MM_swapImgRestore()"><img src="../images/bar_home.gif" alt="Home" name="Home" width="143" height="22" border="0"></a></td>
   
   <td width="143" align="left" valign="top"><script>if(ns4)_d.write("");else _d.write("");with(milonic=new menuname("AboutUs")){style=menuStylemain;alwaysvisible=1;orientation="horizontal";position="relative";aI("image=../images/bar_about.gif;overimage=../images/bar_about_over.gif;showmenu=aboutus;");}drawMenus();</script></td>
   <td width="143" align="left" valign="top"><script>if(ns4)_d.write("");else _d.write("");with(milonic=new menuname("OurSolutions")){style=menuStylemain;alwaysvisible=1;orientation="horizontal";position="relative";aI("image=../images/bar_solutions.gif;overimage=../images/bar_solutions_over.gif;showmenu=oursolutions;");}drawMenus();</script></td>
   <td width="143" align="left" valign="top"><script>if(ns4)_d.write("");else _d.write("");with(milonic=new menuname("ClientResults")){style=menuStylemain;alwaysvisible=1;orientation="horizontal";position="relative";aI("image=../images/bar_client.gif;overimage=../images/bar_client_over.gif;showmenu=clientresults;");}drawMenus();</script></td>
   <td width="143" align="left" valign="top"><script>if(ns4)_d.write("");else _d.write("");with(milonic=new menuname("News")){style=menuStylemain;alwaysvisible=1;orientation="horizontal";position="relative";aI("image=../images/bar_news.gif;overimage=../images/bar_news_over.gif;showmenu=news;");}drawMenus();</script></td>
   <td width="143" align="left" valign="top"><script>if(ns4)_d.write("");else _d.write("");with(milonic=new menuname("Careers")){style=menuStylemain;alwaysvisible=1;orientation="horizontal";position="relative";aI("image=../images/bar_careers.gif;overimage=../images/bar_careers_over.gif;showmenu=careers;");}drawMenus();</script></td>

    <td><img src="../images/bar_rightshim.gif" width="20" height="22"></td>
  </tr>
</table>


Any help would be greatly appreciated!
Code:


Poster: Ruth
Dated: Friday April 29 2005 - 1:57:02 BST

I dont' really know anything about php but I know this site is php and they change the ending of the menu_data file to php instead of js. I have no clue if that has anything to do with this.

Ruth


Poster: chris __at__ KIPdesign.com
Dated: Friday April 29 2005 - 15:43:40 BST

Hi Ruth,

Thanks - I tried it and no go - still doing the same thing...


Poster: chris __at__ KIPdesign.com
Dated: Friday April 29 2005 - 16:49:53 BST

Got it figured out. Received this response from tech support and it worked like a charm:

Quote:
From:
Andy Woolley
Date:
Fri Apr 29 2005
Time:16:24:16

Subject:Re: Menus Freeze Browser

Message:
Hi,

I have pin-pointed the problem down to a duplicate menu.

The culprit is the "OurSolutions" menu - This has been declared twice, once in the HTML and also in the menu_data.js file.

Renaming one of them fixes the problem. I will look into seeing how we can prevent this from occurring in the next release of the menu.

Hope this helps
Milonic Support


Thanks for the help


Poster: Ruth
Dated: Friday April 29 2005 - 16:59:53 BST

Hi Chris,

Glad Andy found it. And it does work real nice. Just out of curiousity, why are you not using the menu to do the home also so all of them are the menu system?

Ruth


Poster: chris __at__ KIPdesign.com
Dated: Friday April 29 2005 - 19:55:59 BST

hmm - hadn't thought of that. Since it doesn't have a corresponding drop down I just left it the way it was previously. Would I just use the same code as the others and just remove the "showmenu" tag? Like this:

Code:
<td width="143" align="left" valign="top"><script>if(ns4)_d.write("");else _d.write("");with(milonic=new menuname("Home")){style=menuStylemain;alwaysvisible=1;orientation="horizontal";position="relative";aI("image=../images/bar_home.gif;overimage=../images/bar_home_over.gif;");}drawMenus();</script></td>


rather than like the ones with drop downs which I did like this:

Code:
<td width="143" align="left" valign="top"><script>if(ns4)_d.write("");else _d.write("");with(milonic=new menuname("AboutUs")){style=menuStylemain;alwaysvisible=1;orientation="horizontal";position="relative";aI("image=../images/bar_about.gif;overimage=../images/bar_about_over.gif;showmenu=sosaboutus;");}drawMenus();</script></td>


Poster: Ruth
Dated: Friday April 29 2005 - 20:22:17 BST

Yes, you'd just leave off the showmenu part. I'm curious is there some reason you have all the items separated, rather than just one main horizontal menu?
Code:
<TABLE id=buttonbar cellSpacing=0 cellPadding=0 width=898 border=1 bordercolor="aqua">
  <TBODY>
  <TR>
    <TD><IMG height=22 src="bar_leftshim.gif" width=20></TD>
    <TD colspan="6">
   <script>
   with(milonic=new menuname("main")){
style=menuStylemain;
alwaysvisible=1;
orientation="horizontal";
position="relative";
menuwidth=858;
aI("image=bar_home.gif;overimage=bar_home_over.gif;url=http://www.kipdesign.com/silveroaknew/site/home.php;");
aI("image=bar_about.gif;overimage=bar_about_over.gif;showmenu=aboutus;");
aI("image=bar_solutions.gif;overimage=bar_solutions_over.gif;showmenu=oursolutions;");
aI("image=bar_client.gif;overimage=bar_client_over.gif;showmenu=clientresults;");
aI("image=bar_news.gif;overimage=bar_news_over.gif;showmenu=news;");
aI("image=bar_careers.gif;overimage=bar_careers_over.gif;showmenu=careers;");
}drawMenus();</SCRIPT>
    </TD>
    <TD><IMG height=22 src="bar_rightshim.gif"
  width=20></TD></TR></TBODY></TABLE>


It seems it would be a lot easier than doing each item separately.

Ruth