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: Archived Topics for the old Version 3.0 JavaScript Menu
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:31

Changing menu item''s link from javascript


Poster: garyevesson
Dated: Friday May 2 2003 - 15:29:40 BST

I need to be able to change the link that a menu item contains from javascript. I can't see any example that does this....

Is there any way to do this (I have a work-around, but it would be better to modify the link the menu....


Poster: kevin3442
Dated: Wednesday May 7 2003 - 0:16:53 BST

I'm assuming that you mean you want to change a menu item's link dynamically, after the menu is rendered?? There are no built-in methods for dynamically changing the menu (links or otherwise), although this may be different with version 4. There have been various code extensions written to change different properties of the menu dynamically, but I don't think you can change an actual link.

Kevin


Poster: garyevesson
Dated: Wednesday May 7 2003 - 15:14:11 BST

That's a shame. It would be good to see it in version 4.

I am dynamically generating a number of popup menus whose actions need to change depending on which link in the page was selected. I've got around it by saving context in the page and then using a common callback routine to reconstruct the correct URL.

It would be much tidier to be able to set the menu item action and let the action execute directly from the menu rather than using a callback.