Changing menu item''s link from javascript

Please note that official support for this menu version has now ceased. There are still plenty of users, though, and the forum is still running. Some of our long-time users may be able to help you out.
Post Reply
garyevesson
Beginner
Beginner
Posts: 2
Joined: Fri May 02, 2003 3:25 pm
Location: Colorado, USA
Contact:

Changing menu item''s link from javascript

Post by garyevesson »

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....
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

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
garyevesson
Beginner
Beginner
Posts: 2
Joined: Fri May 02, 2003 3:25 pm
Location: Colorado, USA
Contact:

Post by garyevesson »

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.
Post Reply