Hi guys I want to design a dynamic menu. For this purpose I written some cfc.
<cfcomponent hint="get main menu" displayname="navigation"> <cffunction name="mainMenu" hint="Get the main menu" returntype="query"> <cfquery name="mainmenu" datasource="cfelsunrise" dbtype="ODBC"> select a.label,b.menuID from menu a inner join menufoundon b on a.menuId=b.menUId where b.foundON=0 </cfquery> <cfreturn mainmenu /> </cffunction> <cffunction name="getChild" hint="get the child menu" output="false" returntype="query"> <cfargument name="menukey" type="any" required="yes"> <cfquery name="child" datasource="cfelsunrise" dbtype="ODBC"> select a.label,b.menuID from menu a inner join menufoundon b on a.menuId=b.menUId where b.foundON=<cfqueryparam cfsqltype="cf_sql_integer" value="#menukey#"> </cfquery> <cfreturn child> </cffunction> </cfcomponent> First Function get root menu , from there it passes rthe param to the second one which gets the child menu (each child can be a parant itself) Calling page <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> <cfinvoke component="cfc.navigation" method="mainMenu" returnvariable="GetMenuHead"> </cfinvoke> <cfoutput> <cfloop query="GetMenuHead"> <a href="?childID=#menuID#">#label#</a><br /> <cfinvoke component="cfc.navigation" method="getChild" returnvariable="GetMenuItemRet"> <cfinvokeargument name="menukey" value="#menuID#"/> </cfinvoke> <cfif GetMenuItemRet.recordcount gt 0> <cfloop query="GetMenuItemRet"> <a href="?childID=#menuID#">#label#</a> </cfloop> </cfif> </cfloop> </cfoutput> </body> </html> On this page I only want to the root menu. After i click on the link it should take me to the child menu where i CAN CLICK ON THE iTEM AND IT SHOULD TAKE ME TO THE NEXT MENU. aND SO ON AND SO FORTH INstead I get All menu items listed on 1 screen Please help Thank you ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312250 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4