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:07
Newbie needs help with Database driven menus in Coldfusion
Poster: CFHam
Dated: Monday October 4 2004 - 14:17:34 BST
I'm looking for examples on how to generate database driven menus in Cold Fusion. Any help would be greatly appreciated.
Poster: John
Dated: Monday October 4 2004 - 14:43:34 BST
First thing to do is upgrade. The v3 menu is no longer supported or developed. v5.48 is available at http://milonic.com/. Come back when you're set and we'll go from there.
Poster: CFHam
Dated: Monday October 4 2004 - 15:19:34 BST
Thanks for the Reply John, I downloaded the new version V5.48.
Poster: John
Dated: Monday October 4 2004 - 17:44:35 BST
Good. Make sure you read the included docs, as many things are different in the v5 system.
As for CF, just change the name of menu_data.js to menu_data.cfm and pop your code in. Follow all the Milonic "rules" for normal menu building - styles, aI statements, etc. Just because it now says .cfm nothing changes except for the CF stuff you add. Here's a very simple example I did on one of my pages...
Code:
with(milonic=new menuname("system")){
style=XPMenuStyle;
borderwidth=1;
orientation="vertical";
aI("text=Browser: <cfoutput>#cgi.http_user_agent#</cfoutput>;image=/sai/graphics/xpblank.gif;");
aI("text=Code Name: "+navigator.appCodeName+";image=/sai/graphics/xpblank.gif;");
aI("text=Color Depth: "+screen.colorDepth+" bit;image=/sai/graphics/xpblank.gif;");
aI("text=IP: <cfoutput>#cgi.remote_addr#</cfoutput>;image=/sai/graphics/xpblank.gif;");
aI("text=Language: "+navigator.browserLanguage+";image=/sai/graphics/xpblank.gif;");
aI("text=Platform: "+navigator.platform+";image=/sai/graphics/xpblank.gif;");
aI("text=Screen Max: "+screen.availWidth+" x "+screen.availHeight+";image=/sai/graphics/xpblank.gif;");
aI("text=Screen Resolution: "+screen.width+" x "+screen.height+";image=/sai/graphics/xpblank.gif;");
}
style=XPMenuStyle;
borderwidth=1;
orientation="vertical";
aI("text=Browser: <cfoutput>#cgi.http_user_agent#</cfoutput>;image=/sai/graphics/xpblank.gif;");
aI("text=Code Name: "+navigator.appCodeName+";image=/sai/graphics/xpblank.gif;");
aI("text=Color Depth: "+screen.colorDepth+" bit;image=/sai/graphics/xpblank.gif;");
aI("text=IP: <cfoutput>#cgi.remote_addr#</cfoutput>;image=/sai/graphics/xpblank.gif;");
aI("text=Language: "+navigator.browserLanguage+";image=/sai/graphics/xpblank.gif;");
aI("text=Platform: "+navigator.platform+";image=/sai/graphics/xpblank.gif;");
aI("text=Screen Max: "+screen.availWidth+" x "+screen.availHeight+";image=/sai/graphics/xpblank.gif;");
aI("text=Screen Resolution: "+screen.width+" x "+screen.height+";image=/sai/graphics/xpblank.gif;");
}
You can see what this returns at http://westcgi.west.asu.edu/sai/, Tech./System Info.