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:47

How do I call a javascritp variable inside of a submenu?


Poster: sbraun
Dated: Thursday December 7 2006 - 6:36:48 GMT

Hi All, Nice menus here. Love 'em.

Q: I set a variable early in the menu_data.js file. How do I call that variable back into a subMenu as part of the url?
See...

<script>
var testvar='choice3';

aI("text=any;url=http://www.mydomain.com?passvar=document.write(testvar);");

I want the url to link to
http://www.mydomain.com?passvar=choice3

Thanks in advance for any insight


Poster: Andy
Dated: Tuesday December 12 2006 - 10:54:13 GMT

Try this:

Code:
aI("text=any;url=http://www.mydomain.com?passvar="+testvar);


Hope this helps,
Andy


Poster: sbraun
Dated: Tuesday December 12 2006 - 12:33:20 GMT

Thanks Andy.
This works great.

sbraun


Poster: sbraun
Dated: Wednesday December 13 2006 - 22:01:13 GMT

This functions works, but it turns out that it is not going to do what I need....

What I really need is to place a variable inside of a url, where the variable is the parent menu text selection. The parent menu text selection is dynamic.


How do I make this work:

aI("text=sometext;url=http://mydomain/mydirectory/myfile.tpl?variable=parentmenutextselection;");

Thanks for any assistance,
sbraun