Here's a use of treeview.nets treeview with recursion.
http://fullcitymedia.com/apps/treeview 

You can download the code here.
http://fullcitymedia.com/apps/treeview/treeview.zip 

Take a look, might be similar to what you're looking for.

Emmet

-----Original Message-----
From: Stephen Whiteley [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 26, 2005 10:30 AM
To: CF-Talk
Subject: Re: Recursion anyone?

Thanks Kerry

I'm starting to understand, got no experience of cfscript but it seems a lot
like actionscript.

Unfortunately I've tried to run the code and I'm getting the following
error.

Context validation error for tag cfscript.  
The start tag must have a matching end tag. An explicit end tag can be
provided by adding </cfscript>. If the body of the tag is empty you can use
the shortcut <cfscript .../>. 


This is the exact code....

<cfquery datasource="#DSN#" name="getAllCategories">
SELECT itemid,parentitemid,adcategoryname FROM tblAdvertTypes
</cfquery>


<cfscript>
variables.inst.menuqry = getAllCategories;

function buildmenu(currentid,depth){
  var i=0;
  for(i=1; i lte parentitemid.menuqry.recorcount; i=i+1){
  if(variables.inst.menuqry.parentitemid[i] eq arguments.currentID)
writeoutput(repeatstring(">",arguments.depth)&variables.menuqry.adcategoryna
me[i]&"<br>");
    buildmenu(variables.inst.menuqry.itemid[i],arguments.depth+1);
  }
  }

buildmenu(10,0)
</cfscript>

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

Reply via email to