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: Saturday July 14 2012 - 06:07:58

putting a script function in the url= parameter

Poster: Derek NYC
Dated: Wednesday January 5 2005 - 5:45:15 GMT

I'm not sure of the best way to go about this. I'm using the menu for a catalog that contains lots of long query strings as links, with the only difference in the string being one parameter (like subcat=10, subcat=5, etc.)

I could cut down the file size a lot if there was a way I could set a default for most of the string and then just tack on the different ending for each menu listing.

Any ideas how I could best incorporate this into the Milonic framework?


Poster: Ruth
Dated: Saturday January 8 2005 - 6:30:23 GMT

I know you can use a function in the url parameter, however, I am not a function person. I don't know how to create one. If you know how to make functions, then maybe the following example can give you some direction.

The function relates to opening a new window in a particular position and it is called in the url parameter:
var newwindow;
function poptastic(url)


Then in the aI string you'd have this to get it to trigger:
I'm sorry I can't more directly answer your question :(


Poster: Derek NYC
Dated: Saturday January 8 2005 - 21:19:42 GMT

It at least gets me on the right track. I can put together something that should work. You reply is most appreciated, Ruth. Thank you.


Poster: kevin3442
Dated: Tuesday January 11 2005 - 0:47:25 GMT

Hi Derek,

Since menu_data.js is all javascript and the parameter passed to Milonic's aI() function is a string (often referred to here as the "aI string"), you could use js string concatenation when building the string to pass to aI(). For example, suppose your base url was:

You could define the base url in a global string variable at the top of your menu_data.js file, like so:
var baseUrl = "";

Then when you want to build an aI string for a menu item, you'd define the static properties at the beginning of the string (like text=... status=... etc.), then concatenate the baseUrl variable to the aI string, then concatenate the value of the parameter you want to pass at the end of the aI string, like so:
aI("text=Item Text;url=" + baseUrl + "10;");

(You could skip the space on either side of the + operator if you want to save even more space... no pun intended). The resulting url for the menu item defined above would be:

Of course, you'd want to modify the approach to suit your own particular URLs.

Hope that helps,


Poster: Derek NYC
Dated: Tuesday January 11 2005 - 3:33:37 GMT

Thanks Kevin,

That helps a lot. I guess you are here to save the day. I have another license to buy from Milonic thanks to your help!