Dynamic Menu Text

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.
Locked
myates
Beginner
Beginner
Posts: 2
Joined: Mon Sep 29, 2003 7:52 am

Dynamic Menu Text

Post by myates »

Is there a way to enter dynamicly generated menu text, i.e. I calculate the date of the previous 9 Sundays and create a text string for each of those days (e.g. Sunday, September 28, 2003) and want to use that generated text string as the menu text for a submenu.

For example:
aI("text=javascript:S1T;url=javascript:window.location=S1url;separatorsize=1")

This of course, does not work since the text that follows 'text=' is taken as literal.
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

Sure can....You have to put the variables outside of the quotes, since you dont want them to be taken literally (which I string is..a literal). Two examples ensue...

Code: Select all

sunday1 = "9/28/2003";
S1T = "9/21/2003";
S1url = "somepage.asp?date=3/3/2003";

aI("text=" + S1T + ";url=somepage.asp?aDate=" + S1T + ";);

aI("text=javascript:"+S1T+";url=javascript:window.location="+S1url+";separatorsize=1;"); 
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
myates
Beginner
Beginner
Posts: 2
Joined: Mon Sep 29, 2003 7:52 am

Post by myates »

Thank you very much!!
Locked