Kerry
I'm trying to get you code to work but will be making a real hash of it, I
wonder if you take a look at this, I think getting the query in is the problem.
<cfquery datasource="#DSN#" name="getAllCategories">
SELECT itemid,parentitemid,adcategoryname FROM tblAdvertTypes
</cfquery>
<cfscript>
variables.inst.menuqry = getAllCategories();
function buildmenu(currentid){
var i=0;
for(i=1; i lte parentitemid.menuqry.recorcount; i=i+1){
if(variables.inst.menuqry.parentitemid[i] eq arguments.currentID)
writeoutput(variables.menuqry.adcategoryname);
buildmenu(variables.inst.menuqry.itemid[i]);
}
}
</cfscript>
<cfset returnValue=buildmenu(10)>
<cfoutput>#returnvalue#</cfoutput>
thanks
Steve
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:222295
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54