[thelist] vague document.body question...

DESCHAMPS Stéphane DvSI/SICoR stephane.deschamps at francetelecom.com
Thu Mar 6 10:51:06 CST 2003


> -----Message d'origine-----
> De : thelist-admin at lists.evolt.org
> [mailto:thelist-admin at lists.evolt.org]De la part de Tom Dell'Aringa
>
> Hi all,
>
> I've been forced to try and troubleshoot some JSP pages that are
> blowing up. These pages use the Milonic DHTML menu, which is at:
>
> http://www.milonic.co.uk/menu/
>
> As you can imagine the source code for the menu is a mess (all run
> together). Anyway, the error that is being thrown is:
>
> _d.body has no properties (based on NN7 reporting)

Hi Tom,

There's something in Milonic's menu, you have to declare a _certain_ line only once, otherwise you break the code. In the menu array files you should have something that reads:

<quote>
//The following line is critical for menu operation, and MUST APPEAR ONLY ONCE. If you have more than one menu_array.js file rem out this line in subsequent files
menunum=0;menus=new Array();_d=document;function addmenu(){menunum++;menus[menunum]=menu;}function dumpmenus(){mt="<script language=javascript>";for(a=1;a<menus.length;a++){mt+=" menu"+a+"=menus["+a+"];"}mt+="<\/script>";_d.write(mt)}
//Please leave the above line intact. The above also needs to be enabled if it not already enabled unless this file is part of a multi pack.
</quote>

Be _very_ careful if you server-side-generate your content, just in case you'd be including this line several times. We all do that at times, and then it doesn't work and we wonder why. Is it solving your problem?

HTH
stef




More information about the thelist mailing list