Desparate..Cannot pass a variable to menu for URL parameter

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
vvogler
Beginner
Beginner
Posts: 2
Joined: Mon Mar 22, 2004 3:23 pm

Desparate..Cannot pass a variable to menu for URL parameter

Post by vvogler »

I am in desparate need to pass a variable to the menu system that can be appended to the URL already defined in the AI. I have tried everything I know to make this happen with no luck.

Here's currently what the menu code looks like:
with(milonic=new menuname("reports")){
style=styleFormsMenu;
screenposition="center"
top=99;
left="offset=-219"
itemwidth=120;
itemheight=10;
aI("text=ExpressReports;url=https://statements.forus.com/ams/;target=reports;status=ExpressReports;");
}

I need to place a variable after the /ams/ above. The data is stored in
session variable "EPSIIAUrl"......

Any help is greatly appreciated.
User avatar
bobwill
Mega Advanced
Mega Advanced
Posts: 229
Joined: Tue Oct 01, 2002 3:03 pm
Location: Kansas
Contact:

Post by bobwill »

If I understand correctly you have a variable named EPSIIAUrl.

I think this will work.

If you'll notice, everything inside the aI function is a string.

Code:


aI("text=ExpressReports;url=https://statements.forus.com/ ams/"+EPSIIAUrl+";target=reports;status=ExpressReports;");
}

Give it a try.
vvogler
Beginner
Beginner
Posts: 2
Joined: Mon Mar 22, 2004 3:23 pm

Post by vvogler »

THanks Bob....However, that doesn't seem to be working for me...
Let me try a few more details...Here's the website org chart..

default.jsp --> Login.java (creates session variable EPSIIAUrl) --> display.jsp (here the menu_data.js and other assorted menu*.js files are imported).....

When I tried your suggestion, I get EPSIIAUrl undefined. The menu code that I posted previous is in the menu_data.js file, if that makes a difference...

I have tried:
aI("text=ExpressReports;url=https://statements.amsservicing.com/ams ... essReports;");

aI("text=ExpressReports;url=https://statements.amsservicing.com/ams/"+<% session.getAttribute("EPSIIAUrl") %>+";target=reports;status=ExpressReports;");

aI("text=ExpressReports;url=https://statements.amsservicing.com/ams/"+<% session.getAttribute(\"EPSIIAUrl\") %>+";target=reports;status=ExpressReports;");

etc, etc......
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

It appears that the variable EPSIIAUrl hasn't been set.

It might be because it's being set in Java.

Try adding this to the menu_data.js file, anywhere will do:

alert(EPSIIAUrl);

If it displays the value, great. If not, you'll get the data from Java into JavaScript, they are completely different systems

Cheers
Andy
Post Reply