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....
Changing menu item''s link from javascript
-
- Beginner
- Posts: 2
- Joined: Fri May 02, 2003 3:25 pm
- Location: Colorado, USA
- Contact:
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
Kevin
-
- Beginner
- Posts: 2
- Joined: Fri May 02, 2003 3:25 pm
- Location: Colorado, USA
- Contact:
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.
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.