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

showmenu and clickfunction conflicting


Poster: ptenn
Dated: Friday November 21 2008 - 19:49:12 GMT

Hi All,

We are running Milonic 5.762 Professional version.

I need to be able to have a menu item that opens another menu (using showmenu), that also calls a JavaScript function when clicked.

Here is my code.

with(milonic=new menuname("rootActionMenu")){
style=XPMainStyle; alwaysvisible=1; orientation="horizontal"; fontsize="30%"; margin=1;
aI("text=Save and Continue;itemwidth=129;url=javascript:saveDemand();clickfunction=toolbarMenuItemClickHandler();");
aI("text=Save and Exit;itemwidth=101;url=javascript:saveExitDemand();clickfunction=toolbarMenuItemClickHandler();");
aI("text=Delete and Exit;itemwidth=115;url=javascript:deleteDemand();clickfunction=toolbarMenuItemClickHandler();");
aI("text=Assign;itemwidth=52;showmenu=Assign;clickfunction=toolbarMenuItemClickHandler();");
aI("text=Issue Demand Now;itemwidth=122;url=javascript:issueDemand();clickfunction=toolbarMenuItemClickHandler();");
}

with(milonic=new menuname("Assign")){
style=XPMenuStyle;
overflow="scroll";
aI("text=Assign Demand to User;itemwidth=157;url=javascript:internalAssignToProfile();clickfunction=toolbarMenuItemClickHandler();");
aI("text=Assign Demand to Business Unit;itemwidth=220;url=javascript:internalAssignToUnit();clickfunction=toolbarMenuItemClickHandler();");
aI("text=Assign Task to User;itemwidth=143;url=javascript:taskAssignToProfile();clickfunction=toolbarMenuItemClickHandler();");
aI("text=Assign Task to Business Unit;itemwidth=206;url=javascript:taskAssignToUnit();clickfunction=toolbarMenuItemClickHandler();");
}

drawMenus();

The item in question is "Assign". All the menu items call the function specified by toolbarMenuItemClickHandler().

However, the "Assign" button is not showing the Assign menu. If I remove the clickfunction=toolbarMenuItemClickHandler() then it will show the Assign menu.

Thanks,

P.J.

Re: showmenu and clickfunction conflicting


Poster: Ruth
Dated: Sunday November 23 2008 - 1:55:55 GMT

Hi,

I'm sorry but that menu is two years old and there's no way we can provided support. We don't even know what the programming, nor what properties were available that far back. I copied your main and submenu but without the style, I just used the existing one in the download and it worked just fine, opened the submenu and when I clicked told me it expected an object, since I didn't have the necessary stuff for the function. I can only suggest you upgrade your menu, or check your style coding, or your function.

Ruth

Re: showmenu and clickfunction conflicting


Poster: ptenn
Dated: Sunday November 23 2008 - 17:16:55 GMT

Ruth,

Thanks for the help.

No problem ... my manager renewed our support contract on Friday (right after I posted this), so I am going to download the latest Milonic menu and see if that works. I'll try on Monday with the latest Milonic menu and see what happens.

Thanks,

P.J.

Re: showmenu and clickfunction conflicting


Poster: Ruth
Dated: Sunday November 23 2008 - 23:50:13 GMT

If it still doesn't work, I'll need to see the page, or have you give me the full data file with the styles and such, any css and the html page code so I can make one up to test :)

Ruth

Re: showmenu and clickfunction conflicting


Poster: ptenn
Dated: Wednesday November 26 2008 - 19:46:17 GMT

Well, it does work after we upgraded to Milonic 5.810. Unfortunately it looks like 5.810 introduces a new bug for us ... I'll post that under a separate topic.

Thanks,

P.J.