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

Internet Explorer 8 crashes with milonic menu 5.830


Poster: Shaf
Dated: Monday April 12 2010 - 19:05:08 BST

Hello,

I have a web page using the milonic menu, but this page also dynamically updates some contents of a <div> roughly every minute. The problem is that after some time the browser would crash (both in vista and in xp).

Removing the call to drawMenus() and the page doesn't crash.

The sample code below is essentially rewriting the contents of a div every 5ms. I first render the menus by calling drawMenus() and then begin my updates. If I didn't call the drawMenus() the page would continue to update normally for a long period. With the call to drawMenus() the page would crash after about 3 minutes

You can replace the img1.jpg with any image. I also ran this on a tomcat server. Any help/feedback appreciated.

Thanks


Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
  <TITLE>Milonic test</TITLE>
  <script type="text/javascript" src="milonic_src.js"></script>
  <script type="text/javascript" src="mmenudom.js"></script>
  <!-- <script type="text/javascript" src="mmenuns4.js"></script> -->
</HEAD>

<BODY>
   <script type="text/javascript">
   
      with(milonic=new menuname("Main Menu")){
         alwaysvisible=1;
         orientation="horizontal";
         style="topMenuStyle";
         aI("showmenu=menu1;");
         aI("text=menu1;url=/menu1.html;");
         aI("text=menu2;url=/menu2.html;");
         aI("text=menu3;url=/menu3.html;");
         aI("text=menu4;url=/menu4.html;");
      }

      drawMenus();

   </script>
   
   <div>
      <br><br><br>
      <div id="myDiv">
      </div>      
   </div>   

   <script type="text/javascript">
   
      //Loops and reinserts the div into the dom.
      setInterval(function() {
         
         var rand = Math.floor(Math.random()*100);
      
         var html = "";
      
         html += "<div>\n";
         html += "      <img src='img1.jpg' />\n";
         html += "      <img src='img1.jpg' />\n";
         html += "      <span>some random number: " + rand + "</span>\n";
         html += "</div>\n";
         

         var dom=  document.getElementById('myDiv');
         dom.innerHTML = html;
                  
      },5);

    </script>
</BODY>
</HTML>

Re: Internet Explorer 8 crashes with milonic menu 5.830


Poster: Andy
Dated: Thursday April 15 2010 - 12:17:54 BST

Hi,

Which browser is crashing and how long does it take before the browser will crash?

Also, what do you mean by crash? - Do you see a fatal error before the browser shuts down?

Re: Internet Explorer 8 crashes with milonic menu 5.830


Poster: Shaf
Dated: Thursday April 15 2010 - 14:43:11 BST

It crashes in IE8 only, its a fatal crash meaning that the browser will close. Sometimes I will see a message saying "Internet Explorer has stopped working. A problem has caused the program to stop working correctly" and looking at the details indicates there was a problem with mshtml.dll. In this example the behaviour was seen after about 3 minutes.