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

Trying to build menu dynamic with Lotus Notes or Domino


Poster: marc4now __at__ yahoo.com
Dated: Thursday August 21 2003 - 6:46:01 BST

I'm trying to link the menu into a Lotus Notes database that will have the menu choices both Top level and sub levels inside of the db.

I'm doing this now with a MS XMLDOM control but I want the menu to work in all browsers.

My question is when building the menu_data.js file
The top level menu is first built.

with(milonic=new menuname("Main Menu")){ etc}

Then all the sub menus are built and the names of them is what links them back to the top level.

Could I build this differently ?
Something like this..

Toplevel1
Submenu1
Submenu2
etc (all Subs for TopLevel1)

Toplevel2
Submenu1
Submenu2
etc (all Subs for TopLevel1)


TIA
Marc


Poster: Hergio
Dated: Thursday August 21 2003 - 15:12:14 BST

I think because Andy tried to make the menu as object oriented as possible, this is definetly possible, but just will take alittle work. I thought it would be as easy as saying with(a menu){ aI(add another item) } but it ain't. :cry: What I am currently doing is going through the code and seeing if I can come up with a way to add items to previously created menus...but its alittle crazy since everything is 'javascript compressed'. Maybe if I can figure it out, Andy can plug it into the menu as a feature. Or he probably could whip it out just as fast, if not faster.

In the meantime what you could do is, chances are you have some sort of server side scripting language that you are using to hook up to the DB. Use that to your advantage and read items from the DB and store them in an array structure thats logical to you, and then when you're done filling the arrays from the DB in whatever fashion you decided, output them to javascript in the order the menu's require. But I will look into seeing if it'd be possible to call aI on a previous added menu. ;)

You understand exactly what I was looking for


Poster: marc4now __at__ yahoo.com
Dated: Friday August 22 2003 - 2:54:01 BST

I know I can do what you are saying but it Lotus Notes that is a very expensive operation for each page that is served up.

The menu's will be dynamic so based upon who you are the menu will change and it won't be in a frameset so each page would have to run a "Agent" and that won't scale very well.

If there is someway to "Add" to the javascript array I can get it to work then.

Thanks for your help


Poster: Hergio
Dated: Friday August 22 2003 - 3:25:34 BST

Well you are going to have to "Add" them in the order the menu likes for the time being. Maybe for now instead of the array stuff, you could do...
Code:
with(milonic=new menuname("XPMain1")){_c=1
top=45;
left=10;
....
aI("text=Regular Stuff;url=RegularUrl.asp;");
aI("text=More Regular Stuff;url=AnotherRegularUrl.asp;");
<%
  Based on user, output certain aI's that belong in XPMain1 if required.
%>
}

with(milonic=new menuname("SubMenu1")){_c=1
top=45;
left=10;
....
aI("text=Couple Stuff;url=Url.asp;");
aI("text=More Normal Stuff;url=NormalStuff.asp;");
<%
  Based on user, output certain aI's that belong in SubMenu1 if required.
%>
}
...

This may be something you could try. Since it sounds like you are querying the DB everytime the pages are laoded so you may as well throw info into each menu on the fly each time based on user too.

Like I said, I will investigate this further and maybe we can come up with something thats a feature.