Using a popup with a submenu scrolling issue

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
Shap5202
Super Advanced
Super Advanced
Posts: 62
Joined: Thu Sep 29, 2005 2:36 pm

Using a popup with a submenu scrolling issue

Post by Shap5202 »

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
Shap5202
Super Advanced
Super Advanced
Posts: 62
Joined: Thu Sep 29, 2005 2:36 pm

Code snipet

Post by Shap5202 »

Here is the menu style

Code: Select all

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";
}
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: Select all

<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?&parameters;text=Existing;closeonclick=1;");
				aI("status=;url=javascript:gotoUrl('someAction.do?&parameters;text=Other;closeonclick=1;");
				aI("status=;url=javascript:gotoUrl('someAction.do?&parameters;text=Property;closeonclick=1;");
				aI("status=;url=javascript:gotoUrl('someAction.do?&parameters;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?&parameters;text=Expense;closeonclick=1;");
				aI("status=;url=javascript:gotoUrl('someAction.do?&parameters;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?&parameters;text=Summary;closeonclick=1;");
				aI("status=;url=javascript:gotoUrl('someAction.do?&parameters;text=Update;closeonclick=1;");
				aI("showmenu=Add_1;text=Add;");
				aI("status=;url=javascript:gotoUrl('someAction.do?&parameters;text=Assign;closeonclick=1;");
				aI("status=;url=javascript:gotoUrl('someAction.do?&parameters;text=Reports;closeonclick=1;");
				aI("status=;url=javascript:gotoUrl('someAction.do?&parameters;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
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

It has to do with it opening onClick and that # in the href. It seems to think that is telling it to go back to the top of the page. I'll have to post about it to Milonic because I don't know what else you'd put there.

Ruth
Post Reply