hi all....
i have a dynamic menu running...
a submenu (say a,b,c are the items) pops up on mouseover of an anchor(say Mn1)..
then on mouseover of the item(a) another submenu(say with items 1,2,3) should be popped up....
for the previous submenu(the one with the items a,b,c) to popup i called popup() function from anchors ( named Mn1) onmouseover event...it is working...
but now for the submenu(with items 1,2,3) what function should i use....
because popup() is not working in aI() and i also tried itemOn() keeping it in another function and called it from aI() using onFunction property....
but nothing is working...
so plz help me out.........
dynamic submenu not working...need urgent help....
hi jhon...thanks for responding...
i am a student and using milonic menu in my academic project..i dont have any site to keep the code...
so i am just pasting the code here...i dont have any milonic_data.js file anymore since i am producing menus dynamically...
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
</head>
<body>
<script type="text/javascript" src="milonic_src_new.js"></script>
<script type="text/javascript" src="mmenudom_new.js"></script>
<script type="text/javascript">
_menuCloseDelay=0;
_menuOpenDelay=0;
_subOffsetTop=2;
_subOffsetLeft=-2;
with(menuStyle=new mm_style()){
styleid=1;
bordercolor="#8A867A";
borderstyle="solid";
borderwidth=1;
fontfamily="MS Sans Serif";
fontsize="70%";
fontstyle="normal";
fontweight="normal";
menubgimage="sfdf/jshfh/backoff2003_web.gif";
image="xpblank.gif";
imagepadding=3;
offbgcolor="transparent";
offcolor="#000000";
onbgcolor="#ffeec2";
onborder="1px solid #000080";
oncolor="#000000";
padding=4;
separatoralign="right";
separatorcolor="#6A8CCB";
separatorpadding=1;
separatorwidth="80%";
subimage="arrow.gif";
subimagepadding=3;
menubgcolor="#EBF0EC";
overflow="scroll";
}
</script>
<script>
var got_it=new Array();
got_it[12]=false;
got_it[13]=false;
var got_its = false;
function collectData(k) {
if (got_it[k] == true) return;
var a=k;
setTimeout('myCallback('+a+')',1);
}
function collectSubData() {
if (got_its == true) {
menuNumber = getMenuByName("sub");
menuNumber2=getMenuByItem(_itemRef)
menuNumber1=getParentItemByItem(_itemRef);
return;
}
setTimeout('mySubCallback()',1);
}
function myCallback(a) {
if(a==12){
with(milonic=new menuname(""+a)){
overflow="scroll";
style=menuStyle;
aI("text=gggg;")
aI("text=Vertical Plain Text Menu;seperatorheight=1")
aI("text=Start Button Menu;")
aI("onfunction=collectSubData();showmenu=sub;text=Sub Menus;");
}
}
else{
with(milonic=new menuname(""+a)){
overflow="scroll";
style=menuStyle;
aI("onfunction=collectSubData();showmenu=sub;text=Sub Menus;");
aI("text=fdgfgfgfl Style DHTML Menu Bar;")
aI("text=dfgfgfg;seperatorheight=1")
aI("text=Sfgfg Menu;")
}
}
mm_createNewMenus();
got_it[a] = true;
menuNumber = getMenuByName(""+a);
popup(""+a,""+a);
}
function mySubCallback() {
with(milonic=new menuname("sub")){
overflow="scroll";
style=menuStyle;
aI("text=Plain Text Horizontal Style DHTML Menu Bar;")
aI("text=Vertical Plain Text Menu;")
aI("text=Start Button Menu;")
}
mm_createNewMenus();
got_its = true;//i am unable to do anything from here
//what i need is just display the submenu with name sub..
//it is not coming on first time onmouseover.....
//if i am using popup the previous menu is disappearing..
//menuNumber = getMenuByName("sub");
menuNumber1=getParentItemByItem(_itemRef)
itemOn(menuNumber1);
}
function _excMD($dta) {
_it=$dta.split(":");
_DoP=_it[1]
return _DoP.replace(/;/g,'')
}
function mm_createNewMenus() {
$r();
_startM=0
for(_y=_mcnt;_y<_m.length;_y++) {
_NM=_m[_y]
_nM=_d.createElement("div")
_nM.id="menu"+_y
_nM.onmouseout=new Function("$I()");
_nM.onmouseover=new Function("$J("+_y+")");
_nM.onselectstart=new Function("return _f");
if(_dB.appendChild)
{
_dB.appendChild(_nM)
o$(_y,0)
_nM.className=_cls
_nS=_nM.style
if($1B)_nS.padding=_excMD($1B)
if(_NM[17])_nS.width=$pX(_NM[17])
if(_NM[24])_nS.height=$pX(_NM[24])
if(_ofb)_nS.background=_excMD(_ofb)
if(p_)_nS.border=_excMD(p_)
if(_wid)_nS.width=_excMD(_wid)
_nM.style.zindex=499
_nM.style.visibility=_visi
if(n_)_nS.position=_excMD(n_)
if($k)_nS.top=_excMD($k)
if($l)_nS.left=_excMD($l)
if(_bgimg)_nS.backgroundImage=_excMD(_bgimg);
if(_mbgc)_nS.background=_excMD(_mbgc)
_NM[23]=0
}
}
}
</script>
<!-- **** JavaScript Menu HTML Code -->
<br><BR><BR><BR><BR><BR><BR>
<a name="12" id="12" href="#" onmouseover="javascript:collectData(12);popup('12','12');" onmouseout=popdown()>Testing Menu</a>
<a name="13" id="13" href="#" onmouseover="javascript:collectData(13);popup('13','13');" onmouseout=popdown()>Testing2 Menu</a>
<br>
<h1></h1>
</body>
</html>
i am using the latest milonic_src.js( ver 5.7)
i am a student and using milonic menu in my academic project..i dont have any site to keep the code...
so i am just pasting the code here...i dont have any milonic_data.js file anymore since i am producing menus dynamically...
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
</head>
<body>
<script type="text/javascript" src="milonic_src_new.js"></script>
<script type="text/javascript" src="mmenudom_new.js"></script>
<script type="text/javascript">
_menuCloseDelay=0;
_menuOpenDelay=0;
_subOffsetTop=2;
_subOffsetLeft=-2;
with(menuStyle=new mm_style()){
styleid=1;
bordercolor="#8A867A";
borderstyle="solid";
borderwidth=1;
fontfamily="MS Sans Serif";
fontsize="70%";
fontstyle="normal";
fontweight="normal";
menubgimage="sfdf/jshfh/backoff2003_web.gif";
image="xpblank.gif";
imagepadding=3;
offbgcolor="transparent";
offcolor="#000000";
onbgcolor="#ffeec2";
onborder="1px solid #000080";
oncolor="#000000";
padding=4;
separatoralign="right";
separatorcolor="#6A8CCB";
separatorpadding=1;
separatorwidth="80%";
subimage="arrow.gif";
subimagepadding=3;
menubgcolor="#EBF0EC";
overflow="scroll";
}
</script>
<script>
var got_it=new Array();
got_it[12]=false;
got_it[13]=false;
var got_its = false;
function collectData(k) {
if (got_it[k] == true) return;
var a=k;
setTimeout('myCallback('+a+')',1);
}
function collectSubData() {
if (got_its == true) {
menuNumber = getMenuByName("sub");
menuNumber2=getMenuByItem(_itemRef)
menuNumber1=getParentItemByItem(_itemRef);
return;
}
setTimeout('mySubCallback()',1);
}
function myCallback(a) {
if(a==12){
with(milonic=new menuname(""+a)){
overflow="scroll";
style=menuStyle;
aI("text=gggg;")
aI("text=Vertical Plain Text Menu;seperatorheight=1")
aI("text=Start Button Menu;")
aI("onfunction=collectSubData();showmenu=sub;text=Sub Menus;");
}
}
else{
with(milonic=new menuname(""+a)){
overflow="scroll";
style=menuStyle;
aI("onfunction=collectSubData();showmenu=sub;text=Sub Menus;");
aI("text=fdgfgfgfl Style DHTML Menu Bar;")
aI("text=dfgfgfg;seperatorheight=1")
aI("text=Sfgfg Menu;")
}
}
mm_createNewMenus();
got_it[a] = true;
menuNumber = getMenuByName(""+a);
popup(""+a,""+a);
}
function mySubCallback() {
with(milonic=new menuname("sub")){
overflow="scroll";
style=menuStyle;
aI("text=Plain Text Horizontal Style DHTML Menu Bar;")
aI("text=Vertical Plain Text Menu;")
aI("text=Start Button Menu;")
}
mm_createNewMenus();
got_its = true;//i am unable to do anything from here
//what i need is just display the submenu with name sub..
//it is not coming on first time onmouseover.....
//if i am using popup the previous menu is disappearing..
//menuNumber = getMenuByName("sub");
menuNumber1=getParentItemByItem(_itemRef)
itemOn(menuNumber1);
}
function _excMD($dta) {
_it=$dta.split(":");
_DoP=_it[1]
return _DoP.replace(/;/g,'')
}
function mm_createNewMenus() {
$r();
_startM=0
for(_y=_mcnt;_y<_m.length;_y++) {
_NM=_m[_y]
_nM=_d.createElement("div")
_nM.id="menu"+_y
_nM.onmouseout=new Function("$I()");
_nM.onmouseover=new Function("$J("+_y+")");
_nM.onselectstart=new Function("return _f");
if(_dB.appendChild)
{
_dB.appendChild(_nM)
o$(_y,0)
_nM.className=_cls
_nS=_nM.style
if($1B)_nS.padding=_excMD($1B)
if(_NM[17])_nS.width=$pX(_NM[17])
if(_NM[24])_nS.height=$pX(_NM[24])
if(_ofb)_nS.background=_excMD(_ofb)
if(p_)_nS.border=_excMD(p_)
if(_wid)_nS.width=_excMD(_wid)
_nM.style.zindex=499
_nM.style.visibility=_visi
if(n_)_nS.position=_excMD(n_)
if($k)_nS.top=_excMD($k)
if($l)_nS.left=_excMD($l)
if(_bgimg)_nS.backgroundImage=_excMD(_bgimg);
if(_mbgc)_nS.background=_excMD(_mbgc)
_NM[23]=0
}
}
}
</script>
<!-- **** JavaScript Menu HTML Code -->
<br><BR><BR><BR><BR><BR><BR>
<a name="12" id="12" href="#" onmouseover="javascript:collectData(12);popup('12','12');" onmouseout=popdown()>Testing Menu</a>
<a name="13" id="13" href="#" onmouseover="javascript:collectData(13);popup('13','13');" onmouseout=popdown()>Testing2 Menu</a>
<br>
<h1></h1>
</body>
</html>
i am using the latest milonic_src.js( ver 5.7)
OK, given http://www.west.asu.edu/sa/testsite/, which is your code with no changes, what exactly is not working?
John
hi john...,,
thanks a lot for your response...and for the test site..
john..,when i was posting the previous message i dint exactly remember the version.i just remembered it is some 5.7+....sorry for that...the milonic version i am using is 5.751.
coming to the problem.. , the problem is when i go to the submenus for the first time the submenus items are not loading.. but after that when i go to it second time...it is loading..i checked it by reloading the page...whenever i go to submenu item(mouseover on it) there is no response...but when i mouse out and mouseover it again then i get it...
hope you got my point....
the other thing i want to say is, the same code is giving a space between the anchor and the submenu in IE..its working fine in Mozilla firefox
thanks a lot for your response...and for the test site..
john..,when i was posting the previous message i dint exactly remember the version.i just remembered it is some 5.7+....sorry for that...the milonic version i am using is 5.751.
coming to the problem.. , the problem is when i go to the submenus for the first time the submenus items are not loading.. but after that when i go to it second time...it is loading..i checked it by reloading the page...whenever i go to submenu item(mouseover on it) there is no response...but when i mouse out and mouseover it again then i get it...
hope you got my point....
the other thing i want to say is, the same code is giving a space between the anchor and the submenu in IE..its working fine in Mozilla firefox