Collapsible Menu Error - _mi[...].child.style is null

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
ulese
Beginner
Beginner
Posts: 1
Joined: Fri Jun 30, 2006 10:16 pm

Collapsible Menu Error - _mi[...].child.style is null

Post by ulese »

This only happens with the collapsible menu with relative position.

If I click on the first expandible menu item on a relative position collapsible menu, nothing happens. When I click on any other expandible menu item, I receive a javascript error.

The error occurs any time you try and expand a menu item after clicking the first expandible menu item. The first item never expands.

The license is for the production address. This is currently on our development server. I did upload to the real server and tested using the licensed address and got the same error. I also got the same error on our dev server using the demo code.

*** Begin Error ***

A Runtime Error has occured.
Do you wish to Debug?

Line: 54 (sometimes Line: 55)
Error: '_mi[...].child.style' is null or not an object

*** End Error ***

The code can be viewed at http://deploy.mitchandco.com/collapsiblemenu
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

I don't know js or programming and can't see what is going on. I did find a 'fix' until this can be reported and fixed by Milonic.

Copy the News submenu, and paste it below, so you end up with two news submenus. Then rename the first one, the original one as News1. For some reason if that submenu is above, then when you click on that News item in the main menu, everthing works fine. Your data file would have this

Code: Select all

with(new menuname("News1")){
	style = sub1Style;
	margin=AllMargin
	aI("text=National;url=#");
	aI("text=International;url=#");
	aI("text=Technology;url=#");
	aI("text=Politics;url=#");
	aI("text=Campaign 2004;url=#");
	aI("text=Health & Wellness;url=#");
	}
with(new menuname("News")){
	style = sub1Style;
	margin=AllMargin
	aI("text=National;url=#");
	aI("text=International;url=#");
	aI("text=Technology;url=#");
	aI("text=Politics;url=#");
	aI("text=Campaign 2004;url=#");
	aI("text=Health & Wellness;url=#");
	}
I'm reporting this to Milonic. They are pretty quick at fixing any bugs.

Ruth
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

With a little more experimenting, I found you can put any 'dummy' submenu above the news one and it will force it to work with the relative position.

Code: Select all

with(new menuname("dummy")){ 
   style = sub1Style; 
   margin=AllMargin 
   aI("text=;"); 
   
   } 
Ruth
Post Reply