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

GENERATE DYNAMIC MENU'


Poster: francescopatea
Dated: Thursday March 30 2006 - 9:47:54 BST

Hi all. I need to generate my menù dynamicaly using a ArrayList.
So I create a JSP page and using JAVA code for loop in my ArrayList and write different section of menu'. When I call the page I view my menù, great , but when I open the list of subitem JS view an error in : mmenudom.js like "not a valid argument".

Can You help my to solve the problem?
Thanks a lot
Francesco.


Browser = IE 6.0.28
this is my menù definition :
------------------------------------------------------------------------------------
<script type="text/javascript">
fixMozillaZIndex=true; //Fixes Z-Index problem with Mozilla browsers but causes odd scrolling problem, toggle to see if it helps
_menuCloseDelay=500;
_menuOpenDelay=150;
_subOffsetTop=0;
_subOffsetLeft=0;




with(horizStyle=new mm_style()){
bordercolor="#999999";
borderstyle="solid";
borderwidth=0;
fontfamily="arial, tahoma";
fontsize="72%";
fontstyle="normal";
headerbgcolor="#AFD1B5";
headerborder=1;
headercolor="#000099";
offbgcolor="transparent"; // colore di sfondo del menù
offcolor="#000000";
onbgcolor="#FEFAD2";
onborder="1px solid #999999";
oncolor="#000000";
onsubimage="on_downboxed.gif";
overbgimage="backon_beige.gif";
padding=3;
pagebgcolor="#CFE2D1";
pagecolor="#000066";
pageimage="db_red.gif";
separatoralign="right";
separatorcolor="#999999";
separatorwidth="85%";
subimage="downboxed.gif";
}

with(vertStyle=new mm_style()){
styleid=1;
bordercolor="#999999";
borderstyle="solid";
borderwidth=1;
fontfamily="arial, tahoma";
fontsize="72%";
fontstyle="normal";
headerbgcolor="#AFD1B5";
headerborder=1;
headercolor="#000099";
image="18_blank.gif";
imagepadding=3;
menubgimage="backoff_green.gif";
offbgcolor="transparent";
offcolor="#000000";
onbgcolor="#";
onborder="1px solid #999999";
oncolor="#000000";
onsubimage="on_13x13_greyboxed.gif";
outfilter="randomdissolve(duration=0.2)";
overfilter="Fade(duration=0.1);Alpha(opacity=95);Shadow(color=#777777', Direction=135, Strength=3)";
padding=3;
pagebgcolor="#CFE2D1";
pagecolor="#000066";
pageimage="db_red.gif";
separatoralign="right";
separatorcolor="#999999";
separatorpadding=1;
separatorwidth="85%";
subimage="black_13x13_greyboxed.gif";
menubgcolor="#F5F5F5";
}


with(milonic=new menuname("menuPrincipale")){
alwaysvisible=1;
left=0;
margin=2;
orientation="horizontal";
style=horizStyle;
top=43;

aI("text=Home;title=Back to Home Page;url=/;");
aI("showmenu=Avanzamento;text=Avanzamenti;");
aI("showmenu=Interrogazioni;text=Interrogazioni;");
aI("showmenu=Chiudi;title=Esci dal programma;text=Esci;url=./logoutAction.do;disabled=true;");
}

with(milonic=new menuname("Avanzamento")){
margin=3;
style=vertStyle;
top="offset=2";

aI("text=regola 1;title=spostamento reparto reparto ;url=/attivaRegola1.do;");
aI("text=regola 2;title=Avanza a reparto ;url=/attivaRegola2.do;");
aI("text=regola 3;title=resi reparto ;url=/attivaRegola3.do;");
aI("text=regola 4;title=chiudi ;url=/attivaRegola4.do;");
}

with(milonic=new menuname("Interrogazioni")){
margin=3;
style=vertStyle;
top="offset=2";

aI("text=enq 1;title=gicenze per item ;url=/attivaEnq1.do;");
aI("text=enq 2;title=ordini per item;url=/attivaEnq2.do;");
aI("text=enq 3;title=fabbisogni ;url=/attivaEnq3.do;");
aI("text=enq 4;title=ordini chiusi ;url=/attivaEnq4.do;");

aI("showmenu=TEST1;text=TEST1;image=./18_tablecell.gif;");
aI("showmenu=CalcoloDisp;text= Calcolo Disponibilita;");
}

with(milonic=new menuname("TEST1")){
margin=3;
style=vertStyle;
top="offset=2";

aI("text=enq 1;title=test1 ;url=/attivaEnq1.do;");
aI("text=enq 2;title=test2;url=/attivaEnq2.do;");
}


with(milonic=new menuname("CalcoloDisp")){
margin=3;
style=vertStyle;
top="offset=2";

aI("text=cdisp 1;title=impegna ;url=/attivaEnq1.do;");
aI("text=cdisp 2;title=disimpegna ;url=/attivaEnq2.do;");
aI("text=cdisp 3;title=simula ;url=/attivaEnq3.do;");
aI("text=cdisp 4;title=verifica ;url=/attivaEnq4.do;");
}


drawMenus();
</script>


Poster: Migru
Dated: Thursday March 30 2006 - 12:44:40 BST

Hi

don´t know if this is valid

onbgcolor="#";


Michael


Poster: francescopatea
Dated: Thursday March 30 2006 - 13:06:11 BST

Thanks Migru, I replaced onbgcolor="#"; with onbgcolor="#FEFAD2";
and now I can navigate correctly in my menù.
Have a good Day
Francesco


Poster: Migru
Dated: Thursday March 30 2006 - 13:31:05 BST

Hi

You´re welcome -

Michael