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:01
Using a popup with a submenu scrolling issue
Poster: Shap5202
Dated: Friday July 7 2006 - 14:11:50 BST
So I have a popup menu that you have to scroll the browser to get to the spot where you activate it, inside this popup menu, is a submenu. When you highlight the menu item to show the submenu, it displays... but farther up the page (there's a big gap between menus). It seems to appear where the menu would have been if you had no scrolled. If that makes any sense.
The site is intranet so I can't post a link. I will try to get a watered down code sample, just give me a few minutes to put it together.
Thanks
Code snipet
Poster: Shap5202
Dated: Friday July 7 2006 - 14:25:11 BST
Here is the menu style
Code:
with(mainStyle=new mm_style()){
bordercolor="#9BA6C2";
borderstyle="solid";
borderwidth=1;
closeonclick=true;
fontfamily="arial, tahoma";
fontsize="11px";
fontstyle="normal";
headerbgcolor="#94BCF8";
headerborder="1px solid #1852D8";
headercolor="#000000";
image="16_blank.gif";
imagepadding=4;
imagealign="top";
menubgcolor="#FFFFFF";
menubgimage="submenu_bkg.gif";
offbgcolor="transparent";
offcolor="#000000";
onbgcolor="#FEFAD2";
oncolor="#000000";
overbgimage="submenu_hover_bkg.gif";
padding=7;
pagebgimage="submenu_selected_bkg.gif";
separatoralign="right";
separatorcolor="#999999";
separatorpadding=1;
separatorwidth="85%";
subimage="menu_arrow.gif";
}
bordercolor="#9BA6C2";
borderstyle="solid";
borderwidth=1;
closeonclick=true;
fontfamily="arial, tahoma";
fontsize="11px";
fontstyle="normal";
headerbgcolor="#94BCF8";
headerborder="1px solid #1852D8";
headercolor="#000000";
image="16_blank.gif";
imagepadding=4;
imagealign="top";
menubgcolor="#FFFFFF";
menubgimage="submenu_bkg.gif";
offbgcolor="transparent";
offcolor="#000000";
onbgcolor="#FEFAD2";
oncolor="#000000";
overbgimage="submenu_hover_bkg.gif";
padding=7;
pagebgimage="submenu_selected_bkg.gif";
separatoralign="right";
separatorcolor="#999999";
separatorpadding=1;
separatorwidth="85%";
subimage="menu_arrow.gif";
}
Here is the menu code. As you can tell, this is in a table. I looked at the page about putting a menu in a table, but it didnt really seem to address popup menus. The table is a list of results basically, each row having a menu that appears when you click on the row.
Code:
<tr onclick="popup('Main_Menu_1', 1);">
<td>
<script>
with(milonic=new menuname("Asset_1")){
style=mainStyle;
style.padding=0;
style.fontsize="10px";
orientation="vertical";
overflow="scroll";
aI("status=;url=javascript:gotoUrl('someAction.do?¶meters;text=Existing;closeonclick=1;");
aI("status=;url=javascript:gotoUrl('someAction.do?¶meters;text=Other;closeonclick=1;");
aI("status=;url=javascript:gotoUrl('someAction.do?¶meters;text=Property;closeonclick=1;");
aI("status=;url=javascript:gotoUrl('someAction.do?¶meters;text=Savings CD Accounts;closeonclick=1;");
}
with(milonic=new menuname("Add_1")){
style=mainStyle;
style.padding=0;
style.fontsize="10px";
orientation="vertical";
overflow="scroll";
aI("showmenu=Asset_1;text=Asset;");
aI("status=;url=javascript:gotoUrl('someAction.do?¶meters;text=Expense;closeonclick=1;");
aI("status=;url=javascript:gotoUrl('someAction.do?¶meters;text=Fee;closeonclick=1;");
}
with(milonic=new menuname("Main_Menu_1")){
style=mainStyle;
style.padding=0;
style.fontsize="10px";
orientation="vertical";
overflow="scroll";
aI("status=;url=javascript:gotoUrl('someAction.do?¶meters;text=Summary;closeonclick=1;");
aI("status=;url=javascript:gotoUrl('someAction.do?¶meters;text=Update;closeonclick=1;");
aI("showmenu=Add_1;text=Add;");
aI("status=;url=javascript:gotoUrl('someAction.do?¶meters;text=Assign;closeonclick=1;");
aI("status=;url=javascript:gotoUrl('someAction.do?¶meters;text=Reports;closeonclick=1;");
aI("status=;url=javascript:gotoUrl('someAction.do?¶meters;text=Payment;closeonclick=1;");
}
drawMenus();
</script>
</td>
<td>Rest of the row data</td>
</tr>
<td>
<script>
with(milonic=new menuname("Asset_1")){
style=mainStyle;
style.padding=0;
style.fontsize="10px";
orientation="vertical";
overflow="scroll";
aI("status=;url=javascript:gotoUrl('someAction.do?¶meters;text=Existing;closeonclick=1;");
aI("status=;url=javascript:gotoUrl('someAction.do?¶meters;text=Other;closeonclick=1;");
aI("status=;url=javascript:gotoUrl('someAction.do?¶meters;text=Property;closeonclick=1;");
aI("status=;url=javascript:gotoUrl('someAction.do?¶meters;text=Savings CD Accounts;closeonclick=1;");
}
with(milonic=new menuname("Add_1")){
style=mainStyle;
style.padding=0;
style.fontsize="10px";
orientation="vertical";
overflow="scroll";
aI("showmenu=Asset_1;text=Asset;");
aI("status=;url=javascript:gotoUrl('someAction.do?¶meters;text=Expense;closeonclick=1;");
aI("status=;url=javascript:gotoUrl('someAction.do?¶meters;text=Fee;closeonclick=1;");
}
with(milonic=new menuname("Main_Menu_1")){
style=mainStyle;
style.padding=0;
style.fontsize="10px";
orientation="vertical";
overflow="scroll";
aI("status=;url=javascript:gotoUrl('someAction.do?¶meters;text=Summary;closeonclick=1;");
aI("status=;url=javascript:gotoUrl('someAction.do?¶meters;text=Update;closeonclick=1;");
aI("showmenu=Add_1;text=Add;");
aI("status=;url=javascript:gotoUrl('someAction.do?¶meters;text=Assign;closeonclick=1;");
aI("status=;url=javascript:gotoUrl('someAction.do?¶meters;text=Reports;closeonclick=1;");
aI("status=;url=javascript:gotoUrl('someAction.do?¶meters;text=Payment;closeonclick=1;");
}
drawMenus();
</script>
</td>
<td>Rest of the row data</td>
</tr>
If there's anything else I can show that would help, let me know. And I'm on ver 5.751