Can you maybe give a page with this on it? There doesn't seem to be anyone who can understand from what you posted, maybe if there is a page someone could get the files and figure it out?
The only thing that came to mind was a function Kevin wrote called setTimeOut something about checking menus were loaded or something before running a function. It's in the demos.
What I say is that you can't use "with(milonic=new menuname(..." method when they are embeded inside a function. It does not seems to be understood or it's something like out of scope.
Let's say you want to create a new menu (not a menu item) when you click on an hyperlink. on an onlick event of the hyperlink, I would call a function where I have a "with(milonic=new menuname(..." method.
I don't have the time at the moment I write this message, but I could write a sample. My example above is the exact sample though.
Our actual project is on a private intranet for now.
Menus will be created from AJAX-like commands.
For example, to create user menus ater the user has login, without reloading the page.
If you are not using the dragable stuff, just remove the type=draggable and be certain to have the latest version 5.740 or later.
That's exactly what we're doing! I have a system with draggable objects that I'd like to have contextual menus show up on the objects based on what is in a database. I'm using AJAX to pull the information to the browser on-the-fly when a right-click occurs on an object. I'd like to integrate the contextual menus into this so they have updated information based on the changes made in the database.
I was wondering if Andy had any examples using the code shown in this post. You must have gotten it to work. I created a relatively simple example and couldn't get a new menu created. I haven't had time to come back to it until now, but I'll see what I can make work. If I can come up with a simple example, I'll post it.
Could you show an example of inserting a dynamically created menu into an existing menu?
Is it possible to substitute a new menu for an existing menu item?
Also, I've been trying to use mm_insertItem method and haven't had much luck. I get a bunch of '_gm has no properties' errors. deleteItem and editItem do seem to work.
JasperJames wrote:Could you show an example of inserting a dynamically created menu into an existing menu?
Is it possible to substitute a new menu for an existing menu item?
Also, I've been trying to use mm_insertItem method and haven't had much luck. I get a bunch of '_gm has no properties' errors. deleteItem and editItem do seem to work.
Thanks for your help,
Jasper
I am also trying to use the mm_insertItem without any luck. Are there any samples of this anywhere? Any help would be appreciated.