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:36
Desparate..Cannot pass a variable to menu for URL parameter
Poster: vvogler
Dated: Monday March 22 2004 - 14:39:15 GMT
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.
Poster: bobwill
Dated: Monday March 22 2004 - 16:28:07 GMT
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.
Poster: vvogler
Dated: Monday March 22 2004 - 18:08:24 GMT
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/"+EPSIIAUrl+";target=reports;status=ExpressReports;");
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......
Poster: Andy
Dated: Monday March 22 2004 - 18:13:17 GMT
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