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
dynamic menus passing variables
Poster: sbraun
Dated: Wednesday December 6 2006 - 5:12:46 GMT
Hi All,
I have a sub_menu that is created dynamically by a server side product. It writes a file named menuselectff.txt
[writefile ../menuselectff.txt][Search db=../signin/data/signin.db&geSSKUdata=1&eqSTATUSdatarq=Active&asSTUDENT_NAMELsort=1][founditems]
aI("text=[STUDENT_NAMEF] [STUDENT_NAMEL];showmenu=menugg;");
[/founditems][/search]
[/writefile]
I call this menugg this way:
with(milonic=new menuname("menugg")){
style=menuStyle;
openonclick=true;
aI("text=Study Hall Passes;url=http://faust.blueboxgrid.com/crew/honorpass/shp_data_form.tpl?vari=[STUDENT_NAMEF1] [STUDENT_NAMEL1];target=_self;");
}
My question is
How do I get the values from the search [STUDENT_NAMEF] [STUDENT_NAMEL] passed into the next menu choice so that they equal [STUDENT_NAMEF1] [STUDENT_NAMEL1].
I simply want to pass 2 variables from one sub menu to another sub menu.
Thanks for any assistance.
sbraun1 __at__ twcny.rr.com
Poster: Andy
Dated: Tuesday December 19 2006 - 12:58:22 GMT
Hi,
Sounds like you need server side scripting to get this to work.
Do you have access to .php or .asp - If so, try renaming the menuselectff.txt to menuselectff.php or menuselectff.asp and then insert some server side scripting to parse the required values into the menu data file
Poster: sbraun
Dated: Tuesday December 19 2006 - 21:43:21 GMT
Thanks for getting back to me Andy,
Yes, I am using server side application (SmithMicro's WebDNA) to develop the dynamic part of the menu, and that's working fine.
I'm just at a loss on how to capture this list of student names from menuff, and insert it into the url= of the next submenus.
I really just need to move the menu text, aI("text= STUDENT_NAMEF1 STUDENT_NAMEL1;"); from submenu menugg, and insert it into the next submenu's url:
aI("text=Study Hall Passes;url=http://faust.blueboxgrid.com/crew/honorpass/shp_data_form.tpl?vari=[STUDENT_NAMEF1] [STUDENT_NAMEL1];target=_self;");
I've been trying to work with the following function:
function mm_getItemNumberProperty(menuName, itemNum)
{
var menuNum = getMenuByName(menuName);
if (itemNum >= _m[menuNum][0].length) return -1;
return _mi[_m[menuNum][0][itemNum]][1];
}
and that's called from :
title = mm_getItemNumberProperty('menuff',4);
But how do I get the '4' above to be a variable?
Thanks for any....
sbraun