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

Dynamic Menu Items Generated from Server?


Poster: cbigger
Dated: Wednesday August 4 2004 - 0:55:53 BST

I'm a beginner to using Milonic menus but so far am VERY impressed. There are a lot of useful samples and I documentation and I am working my way through them.

But I have a quick question about capability that I was hoping someone could answer faster than waiting until I came across that sample...

Currently our web application has a link (lets call it "Commands") and when you click it the server figures out which actual commands are available for the item you selected based on some internal logic. So for example, Item 1 might have the commands "Edit" and "Delete" while Item 2 might have only the "Delete" command available.

We are wanting to replace the "click the link and go to a separate screen where you select the command" interface with a DHTML drop-down menu where you could click the link/icon and then select the command via the menu, resulting in a cleaner interface.

The question I have is what capabilities, if any, are there built-into Milonic menus that could allow the server to communicate back to the client menu which commands should be displayed in which circumstances? Or would I be stuck with client-side only processing and would have to already have that information on the client side priort to building the menu?

I am trying to minimize the performance hit from having to pass ALL of the different item/command combinations up to the client at once and would rather take a "one off hit" of server-client communication at the time of the mouse-over as typically people only will click on one or two of the displayed (100+) items at any given usage session.

If this should be posted to a different forum, please re-direct me :-) I'm just tyring to find my way around.

Thanks.


Poster: Andy
Dated: Wednesday August 4 2004 - 10:12:31 BST

Hi,

I'm sure there are several ways to acheive what you require with the Milonic Menus. Although I'm not sure it could be done "out of the box"

Have you thought about building menus on the fly from the server?

-- Andy


Poster: cbigger
Dated: Saturday August 7 2004 - 4:50:00 BST

Andy,

Currently, the structure is like this:

Item 1 Available Actions
Item 2 Available Actions
Item 3 Available Actions
Item 4 Available Actions

When the user clicks "Available Actions" that is a command to the server to "figure out" which options are available for the particular item chosen.
Those options are then displayed on a secondary screen.

So Item 1 might have Add, Edit, and Delete
While Item 2 might have Edit and Delete
and Item 3 and 4 might have Add and Edit

In real life, there aren't 4 items, there are like 120 items and each could potentially have a very different set of available actions.

What I don't want to do (because of performance) is to have the server pass over/build all of the permutations into the menu directly. Because even though there are 120+ items, most people will only ever click on one or two per session. So all that overhead to pre-build 120 custom menus would be kind of wasteful (and s-l-o-w).

I guess what I'd like to be able to do is to click on Available Actions link and have the menu control shoot a command to the server to ask for a list of items and then have the menu display those items. So it would be the client asking the server for a list and then the client building the menu dynamically. Maybe your suggestion is another way of saying the same thing I am looking for and I am not understanding you correctly? Anyway, thanks for your help and if you have any more info/ideas, I'd appreciate them.

-Cameron


Poster: Andy
Dated: Monday August 9 2004 - 10:20:45 BST

Hi,

I see what you are trying to achieve now.

Well, it is possible but certainly not out of the box. Asking the web page to make a request to a server then change its menus without a page refresh will take some time to perfect.

It's something we can do at Milonic but isn't going to be cheap and may take a while.

Cheers
Andy