Internet Explorer 8 crashes with milonic menu 5.830

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
Shaf
Beginner
Beginner
Posts: 2
Joined: Mon Apr 12, 2010 6:45 pm

Internet Explorer 8 crashes with milonic menu 5.830

Post by Shaf »

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: Select all

<!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>
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Re: Internet Explorer 8 crashes with milonic menu 5.830

Post by Andy »

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?
Shaf
Beginner
Beginner
Posts: 2
Joined: Mon Apr 12, 2010 6:45 pm

Re: Internet Explorer 8 crashes with milonic menu 5.830

Post by Shaf »

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.
Post Reply