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: Thursday February 8 2018 - 06:02:48

Change dynamically the url of a menu


Poster: jdespatis
Dated: Tuesday April 26 2005 - 0:38:19 BST

Hello

Here is my need : I have links in a menu that need to get an id from somewhere to update the internal links of the menu

As a good studient, i've seen the log from this forum.

1/The best solution should be as expected:
http://forum.milonic.com/viewtopic. ... 4348#14348

But I meet some problems : as explained in this link i've added an "aI" link with a onfunction=mm_changeItemProperty(...)
However (the problem appears on Mozilla, I haven't tested on other nav), when i drag the mouse on a menu, i see in the window.status the old url, and AFTERWARDS mm_changeItemProperty() is executed, and then change the url (but afterwards), so if i drag the mouse, and click immediately, i go on the old url, and not the new one (changed by mm_changeItemProperty)

I should drag the mouse on the link, then drag the mouse out, then drag it on again the link to see the new link, i can click on... not a solution...

I've tested by putting updateDisplay = 1 to force the update, in that way, the url is immediately changed, BUT it seems target has been lost, and when i click on the menu, my link appears on top of my page (but it should appear in a specific frame only)

2/ i've seen another solution:
http://forum.milonic.com/viewtopic. ... modify+url

i would find this solution cleaner, but it don't know if a complete solution is possible in fact.
I've put an "aI" link with a url=javascript:open_link(...)

i've done an open_link() function that gives the correct link, but i don't know what to do with it, i've tried to do something like that:
function open_link() {
var foo = http://www.foo.com/id=453
return foo;
}

but of course, when i click on my menu, the page loaded is javascript:open_link('') and not the url returned by open_link()

i've tried to replace return foo, by parent.location = foo;

But in that way, the link is loaded on the top, and not on my specific frame...


Please I need help, i've no more idea by my own...

Thanks
Jerome


Poster: kevin3442
Dated: Wednesday April 27 2005 - 2:35:59 BST

Do the changes need to be made after the page is already loaded, or can the changes be made at load time, so that the menu item's url is changed when the page loads, but not after it is already loaded? In other words, do you know what the changed urls should be when the page is loading, or do you have to wait for some input from the user on the page (after it's loaded) to decide what the changed urls should be?

Cheers,

Kevin