Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

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:57

Making the menu dynamic using cold fusion


Poster: tubize
Dated: Sunday November 9 2003 - 17:03:23 GMT

I use Cold Fusion extensively on my site and do not know javascript.

Has anyone had any experience making the dhtml vertical menu dynamic by connecting it to a database using Cold Fusion. Besides changing the file suffix to .cfm from .js, what else do you have to do and what should one look out for or avoid?

Thanks.


Poster: John
Dated: Monday November 10 2003 - 2:58:53 GMT

Not that hard, actually. I haven't built a full-blown menu system under CF, but I do have a sub-menu pulling some system variables...
Code:
with(milonic=new menuname("system")){   
style=XPMenuStyle;
borderwidth=1;
orientation="vertical";
bgimage="/sai/graphics/winxp_back.gif";
margin=4;
aI("text=Browser: <cfoutput>#cgi.http_user_agent#</cfoutput>;image=/sai/graphics/xpblank.gif;");
aI("text=Code Name: "+navigator.appCodeName+";url=#;image=/sai/graphics/xpblank.gif;");
aI("text=Color Depth: "+screen.colorDepth+" bit;url=#;image=/sai/graphics/xpblank.gif;");
aI("text=IP: <cfoutput>#cgi.remote_addr#</cfoutput>;image=/sai/graphics/xpblank.gif;");
aI("text=Language: "+navigator.browserLanguage+";url=#;image=/sai/graphics/xpblank.gif;");
aI("text=Platform: "+navigator.platform+";url=#;image=/sai/graphics/xpblank.gif;");
aI("text=Screen Max: "+screen.availWidth+"  x  "+screen.availHeight+";url=#;image=/sai/graphics/xpblank.gif;");
aI("text=Screen Resolution: "+screen.width+"  x  "+screen.height+";url=#;image=/sai/graphics/xpblank.gif;");
}

I think you can see the idea from this.

There are a lot of folks on the board running dynamic menus under PHP with no problems, so CF should be the same way. Try a search on PHP if you need to see what they're doing.

I got it working


Poster: tubize
Dated: Monday November 10 2003 - 12:55:27 GMT

I have got a dynamic milonic working on my site. I have renamed the menu to .cfm from .js and you have to include it with the javascript include command and not <cfinclude>. I have one question, though.

I have a number of vertical menus on the site and all of them have the same top section describing the general properties. I was hoping that I could set these properties up in one file and include them in each menu with a javascript include but it looks like this does not work.

Does anyone know if there is a way to do this?

It does appear that you can place a javascript include after the menu properties and I guess that you could use a cfif statement to bring in the lower part of the menu but this is a little messier.